Question: Define a class called PointTypeNode to represent the integer x , y coordinates on a plane, and a PointTypeNode object reference named nxtNode. The class
Define a class called PointTypeNode to represent the integer x y coordinates on a plane, and a PointTypeNode object reference named nxtNode. The class should have the following constructors:
A default constructor that assigns to all numerical variables and the nxtNode reference to null.
A overloaded constructor that takes two integer values x and y and assigns them to the appropriate member variables.
Write the appropriate mutator methods setters that store values in these member variables and accessor methods getters that return the values of the private member variables. Be sure to include the methods to insert new nodes, get the next node reference. Also, include the additional member method definitions listed below:
print: that takes no parameters. The class method must print the x and y coordinates in the form shown below:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
