List of Exercises

Table 2. Exercises in 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 Details on execution
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 Representing emoticons.
21 Poor mans ASCII table
22 Integer value hexadecimal representation
23 Literal problem
24 Binary literals
25 Testing the limits (Difficult)
26 Why using braces in System.out.println(...) ?
27 Composing strings of literals and variables
28 Escaping double quotes
29 Supplementary string exercises
30 Unicode and emoticons
31 int to char narrowing problems
32 Get a byte from 139
33 Ariane, I miss you!
34 Reducing long to int (difficult)
35 int to short assignment
36 int to short assignment using final
37 Dividing values
38 Strange things happen
39 Adding values
40 Representational float and double miracles
41 Expressions involving infinity
42 Calculating a circle's area
43 Calculating a circle's area avoiding accidental redefinition
44 Turning weeks into seconds
45 Turning seconds into weeks
46 Using predefined Java™ standard library constants
47 Converting temperature values
48 Time unit conversion
49 Interest calculation
50 Summing short and char
51 Guessing results
52 Cleaning up the mess
Statements 53 Providing better display
54 Comparing for equality
55 Replacing else if (...){...} by nested if ... else statements
56 Static code analysis
57 Post modifying an exam's marking
58 At the bar
59 Roman numerals
60 Why break?
61 Extending to month days
62 Converting day's names to numbers.
63 Day categories.
64 Roman numerals, using switch
65 Leap years
66 Even or odd?
67 Printing even numbers
68 Merry Xmas
69 More fun with Xmas trees
70 A basic square number table
71 Tidy up the mess!
72 HTML-ify me
73 Auxiliary Example, part 1: A multiplication table
74 Auxiliary Example, part 2: Avoiding redundant entries
75 Creating a real square table
76 Creating a sophisticated HTML version of your square table
77 Display all summands
78 Playing lottery
79 Guessing numbers
80 Smallest multiple
81 Smallest multiple, purely algebraic solution
82 Pythagorean triples
Objects and Classes 83 Understanding access control
84 Explaining times
85 Method signature variants
86 Will a match be found?
87 Modeling geometry objects: Rectangles
88 Modeling circles
89 Adding translations and SVG export.
90 Extending the employee example.
91 Refining access to an employee's attributes
92 File system representation
93 Constructors variable names and this.
94 Your personal String class
95 Turning seconds into weeks part 2
96 Class vs. instance
97 Distinguishing leap- and non-leap years
98 A method for printing square numbers using for, while and do ... while
99 Nicely formatting sine values.
100 Extending our interest calculator
101 Integer value considerations.
102 A class representing fractions
103 Programmer's favourite expression
104 Lotteries revisited
105 Finding the greatest common divisor of two integer values
106 Dealing with local Maven dependencies
107 Cancelling fractions
108 Maximum and absolute value
109 Factorial, the direct way
110 Factorial, the recursive way
111 Binomials, the recursive way
112 The exponential f x = e x
113 Implementing sin ( x ) .
114 Summing up in a different order.
115 Transforming arguments.
116 Compass directions
117 Compass direction neighbours
118 Summing up integers to a given limit
119 Summing up, the better way
120 git local, DIY
121 git distributed, DIY
Core Classes 122 Choosing a good hashCode() method
123 String and good hashCode() implementations.
124 Reconsidering System.out.format().
125 Using constants from java.lang.Math.
126 String exercises
127 Masking strings
128 UTF-8 and emoticons
129 Analyzing strings
130 Pitfalls using ==: Equality of String instances
131 Weird, weirder, weirdest!
132 Analyzing file pathnames
Arrays 133 Converting string arrays to HTML.
134 Route navigation
135 Examinations and mark frequencies
136 Understanding search results
137 Implementing append directly
138 Purge duplicates
139 A container of fixed capacity holding integer values
140 Allow for variable capacity holding integer values
141 Reading console input
142 Prettifying output representation
143 2-dimensional arrays and .length
144 External array and string exercises
145 Tic-tac-toe using a two-dimensional array
146 Changing the game's internal representation
147 Tic-tac-toe, Computer vs. human
148 Adding support to retrieve statistical data.
149 Testing an implementation
150 Improving prime number calculation performance
151 Calculating the median
152 A simple character based plotting application
Inheritance 153 String vs. StringBuffer
154 Alternate implementation of opposite directions
155 Defining a Shape class hierarchy
156 Scaling shapes
157 Providing toString() methods
158 protected vs. package private
159 protected access involving different instances
Error Handling 160 Mind your prey
161 Expected exception test failure
Working with Numbers 162 Auto boxing int to Double?
163 Why using String userInput = "dummyValue"?
164 Parsing short values
165 Parsing short values in hexadecimal representation
166 Locale definitions
167 Formatting int, double and LocaleDate
interface definitions and abstract Classes 168 Understanding Arrays.sort()
169 Sorting Rectangle instances by width
170 Sorting Rectangle instances by width and height
171 Adding flexibility in sorting rectangles
172 A nonsense generator
173 An interface based plotter
Application deployment I (8.12.) 174 Various integer array algorithms
175 A command line version computing a sample's average and median
Reading character streams 176 Adding line numbers to text files
177 A partial implementation of GNU UNIX wc
Collections 178 Inserting strings into a Set.
179 Inserting strings into a List.
180 Representing integer coordinate values
181 Inserting Coordinate instances into a Set.
182 Getting a text's set of words.
183 A text's set of words in alphabetic order
184 Implementing unusual string sorting.
185 Words and corresponding frequencies
186 Formatting an address list
187 Implementing a set of strings
188 Implementing word frequencies by Map<String, Integer> instances.
189 Regain sorting capabilities.
190 Creating an overview of grades showing frequencies
191 Creating an overview of grades showing individual names