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
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
Get step-by-step solutions from verified subject matter experts
