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