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