data structure assignmet.

its about a data structure class assignments, please see the file that I attach below . thanks .

Unformatted Attachment Preview

Don't use plagiarized sources. Get Your Custom Essay on
data structure assignmet.
Just from $13/Page
Order Essay

CSC 241
Programming Assignment #5
Fall 2017
The Polynomial ADT
We can define an abstract data type for single-variable polynomials (with nonnegative exponents) by using a list. Let
. If most of the coefficients ai are
nonzero we could use a simple array to store the coefficients and write routines to perform addition,
subtraction, multiplication, differentiation, and other operations on these polynomials.
An array implementation would be adequate for dense polynomials, where most of the terms are
then the running
time is likely to be unacceptable. One cans see that if arrays were used, then most of
the time is spend multiplying zeros and stepping through what amounts to nonexistent
parts of the input polynomials. This is always undesirable.
present, but if
An alternative is to use a singly linked list. Each term in the polynomial is contained
int one cell, and the cells are stored in decreasing order of exponents. For instance,
Starting with the class Skeleton, below, Implement the Polynomial ADT using linked
lists. You are Not to use the Java LinkedList class, you should “roll your own”
list/node data types.
Your project will be graded automatically, so you must make the Polynomial ADT it’s
own class. However, you must include an application that demonstrates and tests the
key functionality of your implementation. Your write/documentations up should
include a discussion of what you used and the documentation html files generated
by javadoc.
public class Literal {
// various constructors & accessors (not shown)
double coefficient;
int exponent;
//if you roll your own list, then include “Literal next;”
public class Polynomial {
private List terms ; // A list of literals
// if you roll your own, then “private Literal head
public Polynomial() {
// constructor to be implemented
public void insert term(double coef, int exp){
// to be implemented
public Polynomial add(Polynomial rhs) {
// to be implemented
public Polynomial multiply(Polynomial rhs) {
// to be implemented
public String toString(){
// to be implemented use “^” to signify exponents
Documentations 10%
Code Style 15%
Functionality 75% ( 15% for each base operation supported +.-./,*,())
Extra Credit :do not require blanks (i.e. allow users to input “5+7*2” as well as “5 + 7
* 2″ ) 5% must be documented – it’s your responsibility to point it out)
Extra Credit : support negative and positive numbers – unary +/- (i.e.allow users to
input ” -5 + -7 * +2″ ) 5% must be documented – it’s your responsibility to point it
Extra Credit : exponentials (use “^” operator associating right to left) 5% must be
documented – it’s your responsibility to point it out)
Extra Credit : modulo (use “%” operator same association as in JAVA ) 5% must be
documented – it’s your responsibility to point it out)

Purchase answer to see full

Order a unique copy of this paper
(550 words)

Approximate price: $22

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
The price is based on these factors:
Academic level
Number of pages

Order your essay today and save 15% with the discount code ESSAYHELP