Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started