Plain text version | Style: Default, Black and White, Bath

University of Bath Logo
Dr Marina De Vos
Department of Computer Science
Thursday, 16-Aug-2018 22:32:39 BST

Programming I (CM10134 - CM50147): Lab 5

Carry out the following exercises on "More Sophisticated Behaviour".

You will need to show all your code as well as your written answers to exercises 5.23 (5.23)- 5.27 (5.27).

  • Create a new class that takes a string (either as a parameter or using the console reader) and prints the reverse of the string to the terminal window. Hint: this should test your understanding of the StringBuffer class which is part of the java library.
  • Exercises 5.14, 5.16, and 5.17 from the BlueJ book. Please use a switch statement for 5.17.
  • Exercises 5.22 - 5.27 from the BlueJ book.
  • Ensure that you use javadoc correctly to create documentation for your class MapTester (from exercise 5.22). Use BlueJ's Generate Documentation function to generate the documentation.
  • Write a method that breaks a String up into tokens separeted by ":", "-" and "@"
  • Add a field to your BankAccount class from Lab3 that counts how many instances of the class have been created.