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 Distinguishing 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 Purge 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 Compass directions
166 Compass direction neighbours
167 Former zodiac examination task
Core Classes 168 Common pitfall using trigonometric functions
169 Strings on CodingBat
170 Masking strings
171 Analyzing strings
172 Pitfalls using ==: Equality of String instances
173 Weird, weirder, weirdest!
174 Analyzing file pathnames
Inheritance 175 Let me pass, please!
176 Why is == correctly comparing enum instances?
177 String vs. StringBuffer
178 Alternate implementation of opposite directions
179 Defining a Shape class hierarchy
180 Scaling shapes
181 Providing toString() methods
182 protected vs. package private
183 protected access involving different instances
Error Handling 184 Mind your prey
185 Expected exception test failure
Working with Numbers 186 Auto boxing int to Double?
187 Why using String userInput = null?
188 Parsing short values
189 Parsing short values in hexadecimal representation
190 Locale definitions
191 Formatting int, double and LocaleDate
192 Chaining subtract method calls
193 Solving factorial computational overflow
Advanced topics 194 Understanding Arrays.sort()
195 Sorting Rectangle instances by width
196 Sorting Rectangle instances by width and height
197 Adding flexibility in sorting rectangles
198 A nonsense generator
199 An interface based plotter
200 Various integer array algorithms
201 A command line version computing a sample's average and median
202 Adding line numbers to text files
203 A partial implementation of GNU UNIX wc
204 Inserting strings into a Set.
205 Inserting strings into a List.
206 Representing integer coordinate values
207 Inserting Coordinate instances into a Set.
208 Getting a text's set of words.
209 A text's set of words in alphabetic order
210 Implementing unusual string sorting.
211 Words and corresponding frequencies
212 Formatting an address list
213 Implementing a set of strings
214 Implementing word frequencies by Map<String, Integer> instances.
215 Regain sorting capabilities.
216 Creating an overview of grades showing frequencies
217 Creating an overview of grades showing individual names