RHS   Allan   SW construction Exercises UML01


 

UML01

Examin the following class-diagram carefully:

   

Now you're going to implement this using Java!

Start by making the class Car.
Then implement the sub-classes, Taxi and FamilyCar.

Now implement the class Owner - it is very important that you decide how you will implement the association between class Owner and class Car.

To test that your code is working you can create a simple class TestUML where you create some objects by code (no need to read from a text field) and prints the state of the objects using System.out.println(obj.toString());

It is very important that the 4 classes you've just implemented is working before you move on!


Maintained by: Allan Helboe Nielsen
Updated: 3 November, 2005 1:04