n this project, you will implement a Polynomial ADT using Lin ists. You will implement the Multiplication, Addition, and Subtract operations of polynomials.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter18: Stacks And Queues
Section: Chapter Questions
Problem 16PE: The implementation of a queue in an array, as given in this chapter, uses the variable count to...
icon
Related questions
icon
Concept explainers
Question

Please answer this question in C Language using Stack and it's method (CreatStack , Pop, Push, Top, IsEmpty )

Hint: you can use more than one stack

result >
This is a test input
COMP2421
Data structures & Algorithms
testl
MyCommand > test2
MyCommand > test3
MyCommand > print
This is a test input
COMP2421
Data structures & Algorithms
testl
test2
test3
MyCommand > quit
result > Good Bye!
In your implementation, each statement should be stored in a different
node. Implementing the undo/redo functionalities can be done through
stacks. When printing all statements, you should make sure they are
printed in the sequence they were entered.
Transcribed Image Text:result > This is a test input COMP2421 Data structures & Algorithms testl MyCommand > test2 MyCommand > test3 MyCommand > print This is a test input COMP2421 Data structures & Algorithms testl test2 test3 MyCommand > quit result > Good Bye! In your implementation, each statement should be stored in a different node. Implementing the undo/redo functionalities can be done through stacks. When printing all statements, you should make sure they are printed in the sequence they were entered.
In this project, you will implement a Polynomial ADT using Linked
Lists. You will implement the Multiplication, Addition, and Subtraction
operations of polynomials.
Your program should be able to read a file of polynomials called
equations.txt and store each equation in a doubly-linked list. Once the
file is read and equations are loaded into the linked lists, the user
should be able to perform mathematical operations on the
polynomials (addition, subtraction, and multiplication). Once the user
select an operation through a menu, the output should be displayed
and then the menu should show again. Another option for the user is
to store the results of all operations in a file called results.txt. Your
application should show an appropriate screen with menu options to
inform the user of the available operations to let her/him to choose
from.
Example of input file:
2x^7+10x^5-10x^3+2x+1
-15x^7-10x^5+90x^2-2
2x^2 + x - 1
Upon user selection, the application should show the output of the
operation performed (i.e., Addition, Subtraction, or Multiplication).
The user then should have an option to enter a value of the variable
term in the equation to substitute.
Transcribed Image Text:In this project, you will implement a Polynomial ADT using Linked Lists. You will implement the Multiplication, Addition, and Subtraction operations of polynomials. Your program should be able to read a file of polynomials called equations.txt and store each equation in a doubly-linked list. Once the file is read and equations are loaded into the linked lists, the user should be able to perform mathematical operations on the polynomials (addition, subtraction, and multiplication). Once the user select an operation through a menu, the output should be displayed and then the menu should show again. Another option for the user is to store the results of all operations in a file called results.txt. Your application should show an appropriate screen with menu options to inform the user of the available operations to let her/him to choose from. Example of input file: 2x^7+10x^5-10x^3+2x+1 -15x^7-10x^5+90x^2-2 2x^2 + x - 1 Upon user selection, the application should show the output of the operation performed (i.e., Addition, Subtraction, or Multiplication). The user then should have an option to enter a value of the variable term in the equation to substitute.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Depth First Search
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning