List of Exercises

Table 2. Exercises in 113105 Software development 1
Chapter Exercise
No. Title Status of completion
Getting started 1 Starting from and extending class Hello
2 Working with variables
3 A conditional
4 A loop
Language Fundamentals 5 Hotel key cards
6 Literal samples
7 Literals of type int
8 Integer overflow
9 Strange sum result
10 The sum of two values
11 Legal variable names
12 Benefits of final
13 «C» vs. Java.
14 Assignment and type safety
15 An int's minimum and maximum value
16 Pretty may not be pretty
17 Strange output
18 Poor mans ASCII table
19 Integer value hexadecimal representation
20 Binary literals
21 Testing the limits (Difficult)
22 Why using braces in IO.println(...) ?
23 Composing strings of literals and variables
24 Escaping double quotes
25 Supplementary string exercises
26 int and char
27 float vs. double
28 int to char narrowing problems
29 Get a byte from 139
30 Calculating a circle's area
31 Dividing values
32 Strange things with operator ++
33 Adding values
34 Representational float and double miracles
35 Expressions involving infinity
36 int to short assignment
37 int to short assignment using final
38 Turning weeks into seconds
39 Turning seconds into weeks
40 Converting temperature values
41 Time unit conversion
42 Interest calculation
43 Summing short and char
44 Operator & vs. &&
45 Strange addition
46 Understanding +=
47 Three ways expressing the same
48 Guessing results
49 Cleaning up the mess
50 Miraculous addition
51 Evaluating a sum
Statements 52 Blocks and variable glitches
53 Cyclic variable permutation
54 Providing better display
55 Comparing for equality
56 Replacing else if (...){...} by nested if ... else statements
57 Post modifying an exam's marking
58 At the bar
59 Roman numerals
60 Leap years
61 Why break?
62 Extending to month days
63 Converting day's names to numbers.
64 Day categories.
65 Roman numerals, using switch
66 Generating square numbers
67 Calculating factorial
68 Even or odd?
69 Square root approximation
70 Printing numbers
71 Printing just even numbers
72 Merry Xmas
73 More fun with Xmas trees
74 A basic square number table
75 Tidy up the mess!
76 HTML-ify me
77 Auxiliary Example, part 1: A multiplication table
78 Auxiliary Example, part 2: Avoiding redundant entries
79 Creating a real square table
80 Creating a sophisticated HTML version of your square table
81 Display all summands
82 Playing lottery
83 Guessing numbers
84 Smallest multiple
85 Smallest multiple, purely algebraic solution
86 Pythagorean triples
87 Avoiding duplicates and gaining performance
Objects and Classes 88 Defining methods
89 Defining methods
90 Compile time error
91 An Address class
92 Understanding access control
93 Explaining times
94 Implementing getter methods
95 Method signature variants
96 Will a match be found?
97 Dealing with differences in time
98 Modeling geometry objects: Rectangles
99 Modeling circles
100 Adding translations and SVG export.
101 Extending the employee example.
102 Refining access to an employee's attributes
103 File system representation
104 Your personal String class
105 Constructors variable names and this.
106 Class vs. instance
107 Distinguishing leap- and non-leap years
108 A method for printing square numbers using for, while and do ... while
109 Nicely formatting sine values.
110 Extending our interest calculator
111 Integer value considerations.
112 Programmer's favourite expression
113 Lotteries revisited
114 Finding the greatest common divisor of two integer values
115 Dealing with IBAN numbers
116 Cancelling fractions
117 Dealing with local Maven dependencies
118 DNS inflicted groupId / package names clashes
119 Details on execution
120 Maximum and absolute value
121 Factorial, the direct way
122 Factorial, the recursive way
123 Binomials, the recursive way
124 The exponential f x = e x
125 Implementing sin ( x ) .
126 Summing up in a different order.
127 Summing up integers to a given limit
128 Summing up, the better way
129 Turning seconds into weeks, part 2
130 Example: A class representing fractions
131 Compass directions
132 Compass direction neighbours
133 Former zodiac examination task
134 git local, DIY
135 git distributed, DIY
Core Classes 136 Common pitfall using trigonometric functions
137 Strings on CodingBat
138 Masking strings
139 Analyzing strings
140 Pitfalls using ==: Equality of String instances
141 Weird, weirder, weirdest!
142 Analyzing file pathnames
Arrays 143 Assignment to final variable?
144 Converting string arrays to HTML.
145 Route navigation
146 Examinations and mark frequencies
147 Pangram checker
148 Creating a flexible max(...) method.
149 Enforcing mandatory arguments
150 Reconsidering System.out.format().
151 Understanding search results
152 Implementing append directly
153 Purge duplicates
154 A container of fixed capacity holding integer values
155 Allow for variable capacity holding integer values
156 Reading console input
157 Prettifying output representation
158 2-dimensional arrays and .length
159 Representing revenues by quarter and department
160 External array and string exercises
161 Tic-tac-toe using a two-dimensional array
162 Changing the game's internal representation
163 Tic-tac-toe, Computer vs. human
164 Adding support to retrieve statistical data.
165 Testing an implementation
166 Improving prime number calculation performance
167 Calculating the median
168 A simple character based plotting application
Inheritance 169 Let me pass, please!
170 Why is == correctly comparing enum instances?
171 String vs. StringBuffer
172 Alternate implementation of opposite directions
173 Defining a Shape class hierarchy
174 Scaling shapes
175 Providing toString() methods
176 protected vs. package private
177 protected access involving different instances
Error Handling 178 Mind your prey
179 Expected exception test failure
Working with Numbers 180 Auto boxing int to Double?
181 Why using String userInput = null?
182 Parsing short values
183 Parsing short values in hexadecimal representation
184 Locale definitions
185 Formatting int, double and LocaleDate
186 Chaining subtract method calls
Advanced topics 187 Understanding Arrays.sort()
188 Sorting Rectangle instances by width
189 Sorting Rectangle instances by width and height
190 Adding flexibility in sorting rectangles
191 A nonsense generator
192 An interface based plotter
193 Various integer array algorithms
194 A command line version computing a sample's average and median
195 Adding line numbers to text files
196 A partial implementation of GNU UNIX wc
197 Inserting strings into a Set.
198 Inserting strings into a List.
199 Representing integer coordinate values
200 Inserting Coordinate instances into a Set.
201 Getting a text's set of words.
202 A text's set of words in alphabetic order
203 Implementing unusual string sorting.
204 Words and corresponding frequencies
205 Formatting an address list
206 Implementing a set of strings
207 Implementing word frequencies by Map<String, Integer> instances.
208 Regain sorting capabilities.
209 Creating an overview of grades showing frequencies
210 Creating an overview of grades showing individual names