Question: You have to implement a common application to Linked List: Polynomial ADT. In this project you have to implement Multiplication, Addition, and Subtraction of polynomials.

You have to implement a common application to Linked List: Polynomial ADT. In this project you have to implement Multiplication, Addition, and Subtraction of polynomials.
Your application should read a file that contains a series of polynomials. Each polynomial will be represented as a linked a list. Each node contains a coefficient and an exponent of each term. The coefficients can be negative but assume all exponents are positive.
Once you read the file of polynomials, all polynomials should be stored in a stack. The operations will be executed in pairs. For example, assume you have three polynomials, p,q,r, then adding them will be as x=add(q,r), then add(p,x).
Example of input file:
31x5-2x3+x2+4
-x2-3x4
8x2-9
Your application should have the following menu:
Load the polynomials' file
Print the polynomials
Add the polynomials
Subtract the polynomials
Multiply the polynomials
Print the results to the screen
Print the results to file
Exit
The deadline of this assignment is on Thursday 14 November 2024. Late submissions will not be accepted for any reason. Please make sure that your application is running properly on your laptop before the lecture. Project discussions will take place in the lecture room.
You have to implement a common application to

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 Programming Questions!