Feedback for these lessons is very much welcome. If you like or hate something about a lesson let us know, either on GitHub, via Mail or just tell us in person ;)
x
A10 - Static for Shapes
In this exercise we want to handel all kind of exceptions and more.1
Step 1
Create an static
method in Point2D
with the name “CreatePoint”. It will take a string as parameter (in the given writingstyle x-y
).
Hint: Don’t forget your exception handling.
Step 2
Also create and implement a static
methode with the name “CreateCircle” and “CreatPolygon” in Circle
and Polygon
.
Hint: We wrote a implementation in Program
allready.
Step 3
Use in “CreateCircle” and “CreatePolygon” the new created “CreatePoint” method.
Hint: Maybe you need to update your exception handling.
Step 3
Adjust your Main
and the createShape method to the new created methods and use them.
Step 4
Create documentation comments for the new methods.