List of Exercises

Table 2. Exercises in 113105 Software development 1
Chapter Exercise
No. Title Status of completion
Getting started 1 Extending class HelloWorld
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 System.out.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 Evaluating a sum
Statements 51 Blocks and variable glitches
52 Cyclic variable permutation
53 Providing better display
54 Comparing for equality
55 Replacing else if (...){...} by nested if ... else statements
56 Post modifying an exam's marking
57 At the bar
58 Roman numerals
59 Leap years
60 Why break?
61 Extending to month days
62 Converting day's names to numbers.
63 Day categories.
64 Roman numerals, using switch
65 Generating square numbers
66 Calculating factorial
67 Even or odd?
68 Square root approximation
69 Printing numbers
70 Printing just even numbers
71 Merry Xmas
72 More fun with Xmas trees
73 A basic square number table
74 Tidy up the mess!
75 HTML-ify me
76 Auxiliary Example, part 1: A multiplication table
77 Auxiliary Example, part 2: Avoiding redundant entries
78 Creating a real square table
79 Creating a sophisticated HTML version of your square table
80 Display all summands
81 Playing lottery
82 Guessing numbers
83 Smallest multiple
84 Smallest multiple, purely algebraic solution
85 Pythagorean triples
86 Avoiding duplicates and gaining performance
Objects and Classes 87 Compile time error
88 An Address class
89 Understanding access control
90 Explaining times
91 Implementing getter methods
92 Method signature variants
93 Will a match be found?
94 Modeling geometry objects: Rectangles
95 Modeling circles
96 Adding translations and SVG export.
97 Extending the employee example.
98 Refining access to an employee's attributes
99 File system representation
100 Your personal String class
101 Constructors variable names and this.
102 Class vs. instance
103 Distinguishing leap- and non-leap years
104 A method for printing square numbers using for, while and do ... while
105 Nicely formatting sine values.
106 Extending our interest calculator
107 Integer value considerations.
108 Programmer's favourite expression
109 Lotteries revisited
110 Finding the greatest common divisor of two integer values
111 Dealing with IBAN numbers
112 Cancelling fractions
113 Dealing with local Maven dependencies
114 DNS inflicted groupId / package names clashes
115 Details on execution
116 Maximum and absolute value
117 Factorial, the direct way
118 Factorial, the recursive way
119 Binomials, the recursive way
120 The exponential f x = e x
121 Implementing sin ( x ) .
122 Summing up in a different order.
123 Summing up integers to a given limit
124 Summing up, the better way
125 Turning seconds into weeks, part 2
126 Example: A class representing fractions
127 Compass directions
128 Compass direction neighbours
129 Former zodiac examination task
130 git local, DIY
131 git distributed, DIY
Core Classes 132 Choosing a good hashCode() method
133 String and good hashCode() implementations.
134 Common pitfall using trigonometric functions
135 Strings on CodingBat
136 Masking strings
137 Analyzing strings
138 Pitfalls using ==: Equality of String instances
139 Weird, weirder, weirdest!
140 Analyzing file pathnames
Arrays 141 Assignment to final variable?
142 Converting string arrays to HTML.
143 Route navigation
144 Examinations and mark frequencies
145 Pangram checker
146 Reconsidering System.out.format().
147 Understanding search results
148 Implementing append directly
149 Purge duplicates
150 A container of fixed capacity holding integer values
151 Allow for variable capacity holding integer values
152 Reading console input
153 Prettifying output representation
154 2-dimensional arrays and .length
155 External array and string exercises
156 Tic-tac-toe using a two-dimensional array
157 Changing the game's internal representation
158 Tic-tac-toe, Computer vs. human
159 Adding support to retrieve statistical data.
160 Testing an implementation
161 Improving prime number calculation performance
162 Calculating the median
163 A simple character based plotting application
Inheritance 164 Let me pass, please!
165 Why is == correctly comparing enum instances?
166 String vs. StringBuffer
167 Alternate implementation of opposite directions
168 Defining a Shape class hierarchy
169 Scaling shapes
170 Providing toString() methods
171 protected vs. package private
172 protected access involving different instances
Error Handling 173 Mind your prey
174 Expected exception test failure
Working with Numbers 175 Auto boxing int to Double?
176 Why using String userInput = null?
177 Parsing short values
178 Parsing short values in hexadecimal representation
179 Locale definitions
180 Formatting int, double and LocaleDate
181 Chaining subtract method calls
interface definitions and abstract Classes 182 Understanding Arrays.sort()
183 Sorting Rectangle instances by width
184 Sorting Rectangle instances by width and height
185 Adding flexibility in sorting rectangles
186 A nonsense generator
187 An interface based plotter
Application deployment I 188 Various integer array algorithms
189 A command line version computing a sample's average and median
Reading character streams 190 Adding line numbers to text files
191 A partial implementation of GNU UNIX wc
Collections 192 Inserting strings into a Set.
193 Inserting strings into a List.
194 Representing integer coordinate values
195 Inserting Coordinate instances into a Set.
196 Getting a text's set of words.
197 A text's set of words in alphabetic order
198 Implementing unusual string sorting.
199 Words and corresponding frequencies
200 Formatting an address list
201 Implementing a set of strings
202 Implementing word frequencies by Map<String, Integer> instances.
203 Regain sorting capabilities.
204 Creating an overview of grades showing frequencies
205 Creating an overview of grades showing individual names