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 Renaming a class file
3 Editing and compilation
4 Editing bytecode
5 Working with variables
6 Code equivalence
7 Different byte code, same execution results
8 A conditional
9 A loop
10 Getting used to Intellij IDEA
Language Fundamentals 11 Hotel key cards
12 Legal variable names
13 Benefits of final
14 «C» vs. Java.
15 Assignment and type safety
16 Inventing tinyint.
17 An int's minimum and maximum value
18 Pretty may not be pretty
19 Strange output
20 Poor mans ASCII table
21 Integer value hexadecimal representation
22 Binary literals
23 Testing the limits (Difficult)
24 Why using braces in System.out.println(...) ?
25 Composing strings of literals and variables
26 Escaping double quotes
27 Supplementary string exercises
28 int and char
29 float vs. double
30 int to char narrowing problems
31 Get a byte from 139
32 Ariane, I miss you!
33 Reducing long to int (difficult)
34 Calculating a circle's area
35 Dividing values
36 Strange things happen
37 Adding values
38 Representational float and double miracles
39 Expressions involving infinity
40 int to short assignment
41 int to short assignment using final
42 Calculating a circle's area avoiding accidental redefinition
43 Turning weeks into seconds
44 Turning seconds into weeks
45 Using predefined Java™ standard library constants
46 Converting temperature values
47 Time unit conversion
48 Interest calculation
49 Summing short and char
50 Operator & vs. &&
51 Understanding +=
52 Three ways expressing the same
53 Guessing results
54 Cleaning up the mess
Statements 55 Providing better display
56 Comparing for equality
57 Replacing else if (...){...} by nested if ... else statements
58 Post modifying an exam's marking
59 At the bar
60 Roman numerals
61 Leap years
62 Why break?
63 Extending to month days
64 Converting day's names to numbers.
65 Day categories.
66 Roman numerals, using switch
67 Generating square numbers
68 Calculating factorial
69 Even or odd?
70 Square root approximation
71 Printing 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 Compile time error
89 Static code analysis
90 Understanding access control
91 Explaining times
92 Implementing getter methods
93 Method signature variants
94 Will a match be found?
95 Modeling geometry objects: Rectangles
96 Modeling circles
97 Adding translations and SVG export.
98 Extending the employee example.
99 Refining access to an employee's attributes
100 File system representation
101 Your personal String class
102 Constructors variable names and this.
103 Class vs. instance
104 Distinguishing leap- and non-leap years
105 A method for printing square numbers using for, while and do ... while
106 Nicely formatting sine values.
107 Extending our interest calculator
108 Integer value considerations.
109 Programmer's favourite expression
110 Lotteries revisited
111 Finding the greatest common divisor of two integer values
112 Details on execution
113 Cancelling fractions
114 Dealing with local Maven dependencies
115 Maximum and absolute value
116 Factorial, the direct way
117 Factorial, the recursive way
118 Binomials, the recursive way
119 The exponential f x = e x
120 Implementing sin ( x ) .
121 Summing up in a different order.
122 Transforming arguments.
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 git local, DIY
130 git distributed, DIY
Core Classes 131 Choosing a good hashCode() method
132 String and good hashCode() implementations.
133 Common pitfall using trigonometric functions
134 Using constants from java.lang.Math.
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