Question: Free - Response Practice: Point 3 D Class Consider the following class: public class Point { private int x ; private int Y ; public

Free-Response Practice: Point3D Class
Consider the following class:
public class Point
{
private int x;
private int Y;
public Point(int newX, int newY)
{
x= new ;
y= new ;
}
public int getX()
{ return x; }
public int gety()
{ return y; }
}
Write the class Point 3D that extends this class to represent a three-dimensional point with x,y, and z coordinates. Be sure to use appropriate inheritance. Do not duplicate code.
You will need to write:
A constructor that takes three int values representing the x,y, and z coordinates
Appropriate mutator and accessor methods (setters and getters)
 Free-Response Practice: Point3D Class Consider the following class: public class Point

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!