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