PointCP demonstrates now a class can be designed that will support both cartesian and polar co-ordinates. It is the basis of several examples in the book "Object-Oriented Software Engineering: Practical Software Development using UML and Java" by Lethbridge and Laganière.

Simply compile the two java files and run "java PointCPTest".

Back to the source code page.