Exercise 10: Interfaces

Create a new directory for this exercise. Copy the Circle.java file that you created as your Exercise 6 solution into this new directory, then download Money.java and Ex10.java into that same directory.

Modify the Circle and Money classes so that they conform to the UML diagram below. This means you will need to create Writeable, and you will also need to add the specified method to the two classes. You should not remove any of the existing features of those classes.

Interface and classes used in Exercise 10

Note also the following points:

To help you check whether you have implemented all of this correctly, you can use the program in Ex10.java. If you compile and run this program, it should generate the following output:

Money: €2.07
Money: €11.80
Circle: r=6.3952