Question: 1. Define an interface, called volu meArea, within which there're: - a static and final variable PI (with the value 3.14159), and two abstract methods

 1. Define an interface, called volu meArea, within which there're: -
a static and final variable PI (with the value 3.14159), and two
abstract methods volume(double radius) and area(double radius) Write another class MyCircle which
implements the interface VolumeArea. Overriding the two methods: volume(double radius) to return

1. Define an interface, called volu meArea, within which there're: - a static and final variable PI (with the value 3.14159), and two abstract methods volume(double radius) and area(double radius) Write another class MyCircle which implements the interface VolumeArea. Overriding the two methods: volume(double radius) to return a value zero (as the volume of a circle is 0), and area(double radius) to return the area of the circle. - Write the third class Mysphere, also implements VolumeArea. Overriding the two methods: volume(double radius) to calculate and return the volume of the sphere (using (4T*r*rr)/3); area(double radius) to calculate and return the surface area of the sphere (using 4 *t*t) Draw a UMI. diagram that involves volumeArea, MyCircle, and MySphere. Write a main class with the main method to test the methods in MyCircle and MySphere, set the radius of the circle and sphere both to 3.5. And display the results 2. Define an abstract class named Employee. Define following classes to inherit the abstract class n Ross class indicate the boss who get paid with a fixed salary without

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!