subject

Programming Assignment 1 Polynomial
In this assignment, you will implement a polynomial and operations on it using a linked list.
Worth 60 points (6% of course grade)
Background
Read Section 3.1 in the textbook for background on polynomials and polynomial arithmetic.
A polynomial may be represented using a linked list as follows: for every term in the polynomial there is one entry in the linked list consisting of the term's coefficient and degree. The entries are ordered according to ASCENDING values of degree, i. e. lowest degree term first, then next lowest degree term and so on, all the way up to the highest degree term. IMPORTANT: Zero-coefficient terms are NOT stored.
For example, the following polynomial (the symbol '^' is used to mean 'raised to the power'):
4x^5 - 2x^3 + 2x +3
can be represented as the linked list of terms:
(3,0) -> (2,1) -> (-2,3) -> (4,5)
where each term is a (coefficient, degree) pair.
Notes about representation:
Terms are stored in ASCENDING order of degrees from front to rear in a non-circular linked list.
Zero-coefficient terms are NOT stored.
An EMPTY (zero) polynomial is represented by a linked list with NO NODES in it, i. e. referenced by NULL.
Coefficients are real numbers
Degrees are POSITIVE integers, except if there is a constant term, in which case the degree is zero.
There will not be more than one term in the same degree.
If you do not represent all your polynomials (the initial inputs as well as those you get out of doing arithmetic on polynomials) as above, you will lose credit even if your results are mathematically correct.
Running the program
There are three sample input files for you to test (they should be under the project folder in Eclipse):
A file ptest1.txt that contains the polynomial
4x^5 - 2x^3 + 2x + 3
A file ptest2.txt that contains the polynomial
8x^4 + 4x^3 - 3x + 9
A file ptest1opp. txt that contains the polynomial
-4x^5 + 2x^3 - 2x - 3
(the negation of the polynomial in ptest1)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:00
How can i clip a picture to a question on the computer?
Answers: 1
question
Computers and Technology, 24.06.2019 06:30
For which utilities, if any, does the landlord pay?
Answers: 2
question
Computers and Technology, 24.06.2019 14:00
Which describes careers that have similar education requirements but different qualifications? product safety engineers and materials engineers industrial safety engineers and industrial health engineers quality control systems managers and inspectors industrial safety and health engineers and hand packers
Answers: 3
question
Computers and Technology, 24.06.2019 16:00
"gps interaction and cognitive process" respond to the following: imagine that you have been asked to design a gps product that will have voice recognition and bluetooth capability. discuss and conceptualize a user interaction model. predict two (2) problems that may arise in gps products with voice recognition and bluetooth capability. recommend solutions for each of these issues. attention is one of the six cognition processes. when attention is applied to a design, the goal is to make it easier for the end user to quickly locate where he / she should type information on the computer or mobile device screen. compare and contrast how the google search engine and the microsoft bing search engine employ the attention cognition process. provide your opinion as to which search engine better employs the attention cognition process and explain why.
Answers: 3
You know the right answer?
Programming Assignment 1 Polynomial
In this assignment, you will implement a polynomial and o...
Questions
question
Computers and Technology, 03.12.2021 03:50
question
Computers and Technology, 03.12.2021 03:50
question
Mathematics, 03.12.2021 03:50
Questions on the website: 13722360