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
Objects and Classes 93 Defining methods
94 Defining methods
95 Compile time error
96 An Address class
97 Understanding access control
98 Explaining times
99 Implementing getter methods
100 Method signature variants
101 Will a match be found?
102 Dealing with differences in time
103 Modeling geometry objects: Rectangles
104 Modeling circles
105 Adding translations and SVG export.
106 Extending the employee example.
107 Refining access to an employee's attributes
108 File system representation
109 Your personal String class
110 Constructors variable names and this.
111 Class vs. instance
112 Distinguishing leap- and non-leap years
113 A method for printing square numbers using for, while and do ... while
114 Nicely formatting sine values.
115 Extending our interest calculator
116 Integer value considerations.
117 Programmer's favourite expression
118 Lotteries revisited
119 Finding the greatest common divisor of two integer values
120 Dealing with IBAN numbers
121 Cancelling fractions
122 Dealing with local Maven dependencies
123 DNS inflicted groupId / package names clashes
124 Details on execution
125 Maximum and absolute value
126 Factorial, the direct way
127 Factorial, the recursive way
128 Binomials, the recursive way
129 The exponential f x = e x
130 Implementing sin ( x ) .
131 Summing up in a different order.
132 Summing up integers to a given limit
133 Summing up, the better way
134 Turning seconds into weeks, part 2
135 Example: A class representing fractions
136 Compass directions
137 Compass direction neighbours
138 Former zodiac examination task
139 git local, DIY
140 git distributed, DIY
Core Classes 141 Common pitfall using trigonometric functions
142 Strings on CodingBat
143 Masking strings
144 Analyzing strings
145 Pitfalls using ==: Equality of String instances
146 Weird, weirder, weirdest!
147 Analyzing file pathnames
Arrays 148 Assignment to final variable?
149 Converting string arrays to HTML.
150 Route navigation
151 Examinations and mark frequencies
152 Pangram checker
153 Creating a flexible max(...) method.
154 Enforcing mandatory arguments
155 Reconsidering System.out.format().
156 Understanding search results
157 Implementing append directly
158 Purge 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 2-dimensional arrays and .length
164 Representing revenues by quarter and department
165 External array and string exercises
166 Tic-tac-toe using a two-dimensional array
167 Changing the game's internal representation
168 Tic-tac-toe, Computer vs. human
169 Adding support to retrieve statistical data.
170 Testing an implementation
171 Improving prime number calculation performance
172 Calculating the median
173 A simple character based plotting application
Inheritance 174 Let me pass, please!
175 Why is == correctly comparing enum instances?
176 String vs. StringBuffer
177 Alternate implementation of opposite directions
178 Defining a Shape class hierarchy
179 Scaling shapes
180 Providing toString() methods
181 protected vs. package private
182 protected access involving different instances
Error Handling 183 Mind your prey
184 Expected exception test failure
Working with Numbers 185 Auto boxing int to Double?
186 Why using String userInput = null?
187 Parsing short values
188 Parsing short values in hexadecimal representation
189 Locale definitions
190 Formatting int, double and LocaleDate
191 Chaining subtract method calls
192 Solving factorial computational overflow
Advanced topics 193 Understanding Arrays.sort()
194 Sorting Rectangle instances by width
195 Sorting Rectangle instances by width and height
196 Adding flexibility in sorting rectangles
197 A nonsense generator
198 An interface based plotter
199 Various integer array algorithms
200 A command line version computing a sample's average and median
201 Adding line numbers to text files
202 A partial implementation of GNU UNIX wc
203 Inserting strings into a Set.
204 Inserting strings into a List.
205 Representing integer coordinate values
206 Inserting Coordinate instances into a Set.
207 Getting a text's set of words.
208 A text's set of words in alphabetic order
209 Implementing unusual string sorting.
210 Words and corresponding frequencies
211 Formatting an address list
212 Implementing a set of strings
213 Implementing word frequencies by Map<String, Integer> instances.
214 Regain sorting capabilities.
215 Creating an overview of grades showing frequencies
216 Creating an overview of grades showing individual names