Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 its 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

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

Characterize intercultural communication in the age of colonialism.

Answered: 1 week ago

Question

2. (1 point) Given AABC, tan A b b

Answered: 1 week ago

Question

Question How are IRAs treated for state tax law purposes?

Answered: 1 week ago