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 09:30
Is a string of code written to hurt others by damaging or destroying
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
What is the term for water wave that is created by an underwater earthquake
Answers: 1
question
Computers and Technology, 23.06.2019 23:00
Lucas put a lot of thought into the design for his company's new white paper. he made sure to include repeating design elements such as color schemes and decorative images. his goal was to a.add symmetry b.create a unified publication c.provide consistency d.save money
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
CĂłmo pongo un tomo de llamada sin pagar?
Answers: 1
You know the right answer?
Programming Assignment 1 Polynomial
In this assignment, you will implement a polynomial and o...
Questions
question
Mathematics, 21.01.2021 17:10
question
History, 21.01.2021 17:10
question
Mathematics, 21.01.2021 17:10
Questions on the website: 13722360