Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 839 Bytes

File metadata and controls

14 lines (11 loc) · 839 Bytes

Geometric Calculator

In this exercise you are going to improve existing code without changing its behaviour or adding new functionality.

The GeometricCalculator interface provides methods for calculating the area and circumference of different geometric shapes (circles, squares and rectangles). You are not allowed to change the signature of this interface, since it's part of a public API being used by clients. To see how the calculator works you can run the GeometricCalculatorDemo class.

Your job is to improve (refactor) GeometricCalculatorImpl, which implements the interface mentioned above, using established object-oriented principles and design patterns. For instance, the new implementation should make it easy to add new shape types or geometric operations. You are free to add any number of new classes and interfaces.