List of software development 1 lecture exercises

Table 2. Exercises in 113105 Software development 1
Chapter Exercise
No. Title Status of completion
Getting started 1 Starting from and extending class Hello
2 Working with variables
3 A conditional
4 A loop
Language Fundamentals 5 Hotel key cards
6 Summing up values
7 Literal samples
8 Literals of type int
9 Integer overflow
10 Strange sum result
11 The sum of two values
12 Legal variable names
13 Benefits of final
14 Assigning int to char
15 «C» vs. Java.
16 Assignment and type safety
17 An int's minimum and maximum value
18 Assignment miracle
19 Pretty may not be pretty
20 Strange output
21 Poor mans ASCII table
22 Integer value hexadecimal representation
23 Binary literals
24 Testing the limits (Difficult)
25 Why using braces in IO.println(...) ?
26 Composing strings of literals and variables
27 Escaping double quotes
28 Supplementary string exercises
29 Show neighboring characters
30 Quote inside strings
31 Quote inside strings
32 int and char
33 float vs. double
34 int to char narrowing problems
35 Get a byte from 139
36 Calculating a circle's area
37 Dividing values
38 Strange things with operator ++
39 Adding values
40 Representational float and double miracles
41 Expressions involving infinity
42 int to short assignment
43 int to short assignment using final
44 Turning weeks into seconds
45 Turning seconds into weeks
46 Converting temperature values
47 Time unit conversion
48 Interest calculation
49 Summing short and char
50 Operator & vs. &&
51 Strange addition
52 Understanding +=
53 Three ways expressing the same
54 Guessing results
55 Cleaning up the mess
56 Miraculous addition
57 Evaluating a sum
Statements 58 Blocks and variable glitches
59 Cyclic variable permutation
60 Providing better display
61 Comparing for equality
62 Replacing else if (...){...} by nested if ... else statements
63 Post modifying an exam's marking
64 At the bar
65 Roman numerals
66 Leap years
67 Why “break”?
68 Extending to month days
69 Converting day's names to numbers.
70 Day categories.
71 Roman numerals, using switch
72 Computing the absolute value
73 Absolute value, flawed implementation
74 Arithmetic mean
75 Analyzing a method call
76 Generating square numbers
77 Calculating factorial
78 Mitigating factorial overflow problems
79 Even or odd?
80 Square root approximation
81 Printing numbers
82 Printing just even numbers
83 Merry Xmas
84 More fun with Xmas trees
85 A basic square number table
86 Tidy up the mess!
87 HTML-ify me
88 Auxiliary Example, part 1: A multiplication table
89 Auxiliary Example, part 2: Avoiding redundant entries
90 Creating a “real” square table
91 Creating a sophisticated HTML version of your square table
92 Display all summands
93 Playing lottery
94 Guessing numbers
95 Smallest multiple
96 Smallest multiple, purely algebraic solution
97 Pythagorean triples
98 Avoiding duplicates and gaining performance
Arrays 99 Assignment to final variable?
100 Implementing getAverage(...).
101 2-dimensional arrays and .length
102 Representing revenues by quarter and department
103 Summing up revenues
104 External array and string exercises
Objects and Classes 105 Helper methods
106 A return statement related error
107 Compile time error
108 An Address class
109 Understanding access control
110 Explaining times
111 Implementing getter methods
112 Method signature variants
113 Will a match be found?
114 Dealing with differences in time
115 Modeling geometry objects: Rectangles
116 Modeling circles
117 Adding translations and SVG export.
118 Extending the employee example.
119 Refining access to an employee's attributes
120 File system representation
121 Your personal String class
122 Constructors variable names and “this”.
123 Class vs. instance
124 Leap- and non-leap years
125 A method for printing square numbers using for, while and do ... while
126 Nicely formatting sine values.
127 Extending our interest calculator
128 Integer value considerations.
129 Programmer's favourite expression
130 Lotteries revisited
131 Finding the greatest common divisor of two integer values
132 Dealing with IBAN numbers
133 Cancelling fractions
134 Dealing with local Maven dependencies
135 DNS inflicted groupId / package names clashes
136 Details on execution
137 Maximum and absolute value
138 Factorial, the direct way
139 Factorial, the recursive way
140 Binomials, the recursive way
141 The exponential f ⁡ x = e x
142 Implementing sin ⁡ ( x ) .
143 Summing up in a different order.
144 Summing up integers to a given limit
145 Summing up, the better way
146 Turning seconds into weeks, part 2
147 Example: A class representing fractions
148 Converting string arrays to HTML.
149 Pangram checker
150 Route navigation
151 Examinations and mark frequencies
152 External string exercises
153 Creating a flexible max(...) method.
154 Enforcing mandatory arguments
155 Reconsidering System.out.format().
156 Understanding search results
157 Combining two arrays
158 Implementing append directly
159 Purging duplicates
160 A container of fixed capacity holding integer values
161 Allow for variable capacity holding integer values
162 Reading console input
163 Prettifying output representation
164 Tic-tac-toe using a two-dimensional array
165 Changing the game's internal representation
166 Tic-tac-toe, Computer vs. human
167 Adding support to retrieve statistical data.
168 Testing an implementation
169 Improving prime number calculation performance
170 Calculating the median
171 A simple character based plotting application
172 Getting a day's predecessor
173 Compass directions
174 Compass direction neighbours
175 Former zodiac examination task
Core Classes 176 Common pitfall using trigonometric functions
177 Strings on CodingBat
178 Masking strings
179 Splitting strings
180 Analyzing strings
181 Pitfalls using “==”: Equality of String instances
182 Weird, weirder, weirdest!
183 Analyzing file pathnames
Inheritance 184 Let me pass, please!
185 Why is == correctly comparing enum instances?
186 String vs. StringBuffer
187 Alternate implementation of opposite directions
188 Defining a Shape class hierarchy
189 Scaling shapes
190 Providing toString() methods
191 protected vs. “package private”
192 protected access involving different instances
Error Handling 193 Mind your prey
194 Expected exception test failure
Working with Numbers 195 Auto boxing int to Double?
196 Why using String userInput = null?
197 Parsing short values
198 Parsing short values in hexadecimal representation
199 Locale definitions
200 Formatting int, double and LocaleDate
201 Chaining subtract method calls
202 Solving factorial computational overflow
Advanced topics 203 Understanding Arrays.sort()
204 Sorting Rectangle instances by width
205 Sorting Rectangle instances by width and height
206 Adding flexibility in sorting rectangles
207 A nonsense generator
208 An interface based plotter
209 Various integer array algorithms
210 A command line version computing a sample's average and median
211 Adding line numbers to text files
212 A partial implementation of GNU UNIX wc
213 Inserting strings into a Set.
214 Inserting strings into a List.
215 Representing integer coordinate values
216 Inserting Coordinate instances into a Set.
217 Getting a text's set of words.
218 A text's set of words in alphabetic order
219 Implementing unusual string sorting.
220 Words and corresponding frequencies
221 Formatting an address list
222 Implementing a set of strings
223 Implementing word frequencies by Map<String, Integer> instances.
224 Regain sorting capabilities.
225 Creating an overview of grades showing frequencies
226 Creating an overview of grades showing individual names