Question: make a class (in java) called Point and another one called ExtendedCircle. There also has to be a class called ExtendedCircleTest to test all of

make a class (in java) called Point and another one called ExtendedCircle. There also has to be a class called ExtendedCircleTest to test all of this

I would really appreciate any kind of help because I am stuck. This is for Java.

I will try to only provide one piece of the code for each question, since I don't want to overwork you guys and I appreciate the help!

Point class has to have points in the format of (x,y) Point class needs to include

- x and y coordinates that are instance variables using int types for the variables - two constructors. a default one and a two-parameter. The default has to set the x and y coords to 0 and the two parameter has to include a given x and y as parameters - the x and y coordinates should include get/set methods - toString method should be included and should return a string in the format of "(x,y)" - distance should be included as a method to calculate the distance between one point and another. example ) it takes one parameter of (point type) and returns a double value (math.sqrt method can be used to calculat square root) - equals method needs to be included with 1 parameter of object type returning boolean value. two points are equal if they have the same x and y coords

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Java public class Point private int x private int y Default constructor sets x and y to 0 public Poi... View full answer

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 Programming Questions!