Exercise 1 | with solutions here | |||
Exercise 2 | with solutions here | |||
Exercise 3 | with solutions here and here | |||
Exercise 4 | with solutions here | (both iterative and recursive solutions given) | ||
Mid-term test | with model answers here | |||
Exercise 5 | with solutions here | |||
Exercise 6 | with solutions here | |||
Exercise 7 | with solutions here | |||
Exercise 8 | with solutions here. | |||
Exercise 9 | with solutions here. | |||
Exercise 10 | with solutions here, | also End-of-term test | with model answers here |
Note that where solutions are given, they will include supporting
code which will allow you to test the method. Please note that under
examination conditions, if you are asked to write a method to do something you
should write just that method (and possibly auxiliary methods which
you define yourself to make it work), and not the supporting code.
No exam question will ask or expect you to write the main
method which starts off execution of a Java program, or code to prompt
a human user to type anything or code to display any results to a human
user.