Question: 1.Define a class to hold information about a single point ( Point class). 2.Write a method of the Point class to determine the distance to

1.Define a class to hold information about a single point (Point class).

2.Write a method of the Point class to determine the distance to another Point.

3.Use composition to define a Circle.

4.Write a method of the Circle classes to determine if a Point is inside the Circle.

5.Write a method of the Circle classes to determine if a Circle is wholly inside another Circle.

6.Write a method of the Circle classes to determine if a circle surrounds another circle. Use the method above.

Write a new class called TestCircle, which contains the main method in order to test your classes. In the main method do the following tasks:

1.Create a circle object

2.Create a point object

3.Print the distance from that point to the centre of the circle.

4.Create a second circle object

5.Find out if the second circle is inside the first one.

Please answer all the Question with Comment

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!