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 Summing up integers to a given limit
117 Summing up, the better way
Core Classes 118 Choosing a good hashCode() method
119 String and good hashCode() implementations.
120 Reconsidering System.out.format().
121 Using constants from java.lang.Math.
122 String exercises
123 Masking strings
124 UTF-8 and emoticons
125 Analyzing strings
126 Pitfalls using ==: Equality of String instances
127 Weird, weirder, weirdest!
128 Analyzing file pathnames
Arrays 129 Converting string arrays to HTML.
130 Route navigation
131 Examinations and mark frequencies
132 Understanding search results
133 Implementing append directly
134 Purge duplicates
135 A container of fixed capacity holding integer values
136 Allow for variable capacity holding integer values
137 Reading console input
138 Prettifying output representation
139 2-dimensional arrays and .length
140 External array and string exercises
141 Tic-tac-toe using a two-dimensional array
142 Changing the game's internal representation
143 Tic-tac-toe, Computer vs. human
144 Adding support to retrieve statistical data.
145 Testing an implementation
146 Improving prime number calculation performance
147 Calculating the median
148 A simple character based plotting application
Inheritance 149 String vs. StringBuffer
150 Defining a Shape class hierarchy
151 Scaling shapes
152 Providing toString() methods
153 protected vs. package private
154 protected access involving different instances
Error Handling 155 Mind your prey
156 Expected exception test failure
Working with Numbers 157 Why using String userInput = "dummyValue"?
158 Parsing short values
159 Parsing short values in hexadecimal representation
160 Locale definitions
161 Formatting int, double and LocaleDate
interface definitions and abstract Classes 162 Understanding Arrays.sort()
163 Sorting Rectangle instances by width
164 Sorting Rectangle instances by width and height
165 Adding flexibility in sorting rectangles
166 A nonsense generator
167 An interface based plotter
Application deployment I (8.12.) 168 Various integer array algorithms
169 A command line version computing a sample's average and median
Reading character streams 170 Adding line numbers to text files
171 A partial implementation of GNU UNIX wc
Collections 172 Inserting strings into a Set.
173 Inserting strings into a List.
174 Representing integer coordinate values
175 Inserting Coordinate instances into a Set.
176 Getting a text's set of words.
177 A text's set of words in alphabetic order
178 Implementing unusual string sorting.
179 Words and corresponding frequencies
180 Formatting an address list
181 Implementing a set of strings
182 Implementing word frequencies by Map<String, Integer> instances.
183 Regain sorting capabilities.
184 Creating an overview of grades showing frequencies
185 Creating an overview of grades showing individual names