Question: Implement a node class in which each node contains both an integer and a double number. Use this class to reimplement the polynomial class from

Implement a node class in which each node contains both an integer and a double number. Use this class to reimplement the polynomial class from Section 3.4 so that the coefficients and their exponents are stored in a linked list. This linked list should contain no more than one node for any particular exponent. Some of the operations will be easier to implement (or more efficient) if you keep the nodes in order from smallest to largest exponent. Also, some operations will be more efficient if you include an extra instance variable that is a reference to the most recently accessed node. (Otherwise, you would need to start over at the head of the list every time.)

Step by Step Solution

3.43 Rating (162 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To implement a node class for a linked list of polynomial terms we will need to define a class that has instance variables for the coefficient and exp... 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 Data Structures and Other Objects Using Java Questions!