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 Defining methods
88 Defining methods
89 Compile time error
90 An Address class
91 Understanding access control
92 Explaining times
93 Implementing getter methods
94 Method signature variants
95 Will a match be found?
96 Dealing with differences in time
97 Modeling geometry objects: Rectangles
98 Modeling circles
99 Adding translations and SVG export.
100 Extending the employee example.
101 Refining access to an employee's attributes
102 File system representation
103 Your personal String class
104 Constructors variable names and this.
105 Class vs. instance
106 Distinguishing leap- and non-leap years
107 A method for printing square numbers using for, while and do ... while
108 Nicely formatting sine values.
109 Extending our interest calculator
110 Integer value considerations.
111 Programmer's favourite expression
112 Lotteries revisited
113 Finding the greatest common divisor of two integer values
114 Dealing with IBAN numbers
115 Cancelling fractions
116 Dealing with local Maven dependencies
117 DNS inflicted groupId / package names clashes
118 Details on execution
119 Maximum and absolute value
120 Factorial, the direct way
121 Factorial, the recursive way
122 Binomials, the recursive way
123 The exponential f x = e x
124 Implementing sin ( x ) .
125 Summing up in a different order.
126 Summing up integers to a given limit
127 Summing up, the better way
128 Turning seconds into weeks, part 2
129 Example: A class representing fractions
130 Compass directions
131 Compass direction neighbours
132 Former zodiac examination task
133 git local, DIY
134 git distributed, DIY
Core Classes 135 Common pitfall using trigonometric functions
136 Strings on CodingBat
137 Masking strings
138 Analyzing strings
139 Pitfalls using ==: Equality of String instances
140 Weird, weirder, weirdest!
141 Analyzing file pathnames
Arrays 142 Assignment to final variable?
143 Converting string arrays to HTML.
144 Route navigation
145 Examinations and mark frequencies
146 Pangram checker
147 Reconsidering System.out.format().
148 Understanding search results
149 Implementing append directly
150 Purge duplicates
151 A container of fixed capacity holding integer values
152 Allow for variable capacity holding integer values
153 Reading console input
154 Prettifying output representation
155 2-dimensional arrays and .length
156 External array and string exercises
157 Tic-tac-toe using a two-dimensional array
158 Changing the game's internal representation
159 Tic-tac-toe, Computer vs. human
160 Adding support to retrieve statistical data.
161 Testing an implementation
162 Improving prime number calculation performance
163 Calculating the median
164 A simple character based plotting application
Inheritance 165 Let me pass, please!
166 Why is == correctly comparing enum instances?
167 String vs. StringBuffer
168 Alternate implementation of opposite directions
169 Defining a Shape class hierarchy
170 Scaling shapes
171 Providing toString() methods
172 protected vs. package private
173 protected access involving different instances
Error Handling 174 Mind your prey
175 Expected exception test failure
Working with Numbers 176 Auto boxing int to Double?
177 Why using String userInput = null?
178 Parsing short values
179 Parsing short values in hexadecimal representation
180 Locale definitions
181 Formatting int, double and LocaleDate
182 Chaining subtract method calls
interface definitions and abstract Classes 183 Understanding Arrays.sort()
184 Sorting Rectangle instances by width
185 Sorting Rectangle instances by width and height
186 Adding flexibility in sorting rectangles
187 A nonsense generator
188 An interface based plotter
Application deployment I 189 Various integer array algorithms
190 A command line version computing a sample's average and median
Reading character streams 191 Adding line numbers to text files
192 A partial implementation of GNU UNIX wc
Collections 193 Inserting strings into a Set.
194 Inserting strings into a List.
195 Representing integer coordinate values
196 Inserting Coordinate instances into a Set.
197 Getting a text's set of words.
198 A text's set of words in alphabetic order
199 Implementing unusual string sorting.
200 Words and corresponding frequencies
201 Formatting an address list
202 Implementing a set of strings
203 Implementing word frequencies by Map<String, Integer> instances.
204 Regain sorting capabilities.
205 Creating an overview of grades showing frequencies
206 Creating an overview of grades showing individual names