Question: 1. A static method has no implicit parameters. Sometimes, we use static methods because all the method parameters are numbers. Numbers are not objects, so

1. A static method has no implicit parameters. Sometimes, we use static methods because all the method parameters are numbers. Numbers are not objects, so they cannot be implicit parameters of a method. Write two static methods that compute:
a. the circumference of a circle with a given radius r
b. the area of a circle with a given radius r
Place the two static methods into a class Geometry. Write tester program to test your class.
2. An overuse of static methods is often a sign of poor object-oriented design. Explain how you can compute the circumference and area of circles in a more object-oriented fashion. Then provide the more object-oriented solution.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!