Java OOP GUIDE / WORK CIRCLE CLASS 3 SOLUTIONS TASK –
PART 1 – STARTING CODE No solution
required. TASK –
PART 2 – ADDING TO THE CIRCLE CLASS Here is my solution with the code that was provided
in Part 1 displayed in green:
Note: The area(),
circumference() and diameter() methods could all easily have been coded as a
single line instead of two lines. TASK –
PART 3 – TESTING THE CIRCLE CLASS
|
||
The above will
output the following:
|