Completed

coding assignment

// Task 1

public class Term : IComparable

{

private double Coefficient;

private byte Exponent;

// Creates a term with the given coefficient and exponent

public Term(double coefficient, byte exponent)

{

Coefficient = coefficient;

Exponent = exponent;

}

// Evaluates the current term for a given x

public double Evaluate(double x)

{

return Coefficient * [login to view URL](x, Exponent);

}

// Returns -1, 0, or 1 if the exponent of the current term

// is less than, equal to, or greater than the exponent of obj.

public int CompareTo(Object obj)

{

Term other = (Term)obj;

if (Exponent < [login to view URL])

{

return -1;

}

else if (Exponent == [login to view URL])

{

return 0;

}

else

{

return 1;

}

}

// Read and write properties for each data member

}

// Task 2

public class Node<T>

{

private T item;

private Node<T> next;

// constructor

public Node(T item, Node<T> next)

{

[login to view URL] = item;

[login to view URL] = next;

}

// Read and write properties or getter/setter for each data member

public T getItem()

{

return item;

}

public void setItem(T item)

{

[login to view URL] = item;

}

public Node<T> getNext()

{

return next;

}

public void setNext(Node<T> next)

{

[login to view URL] = next;

}

}

// Task 3

interface IDegree

{

bool Order(Object obj);

}

public class Polynomial : IDegree

{

// A reference to the first node of a singly-linked list

private Node<Term> front;

// Inserts the given term t into the current polynomial in its proper order

public void AddTerm(Term t) {

if (t != null) ;

[login to view URL](sum("OLD, polynomial consisting of term t"))

}

{ … }

// Adds the given polynomials p and q to yield a new polynomial

public static Polynomial operator +(Polynomial p, Polynomial q)

{ … }

// Multiplies the given polynomials p and q to yield a new polynomial

public static Polynomial operator *(Polynomial p, Polynomial q)

{ … }

// Evaluates the current polynomial for a given x

public double Evaluate(double x)

{ … }

// Prints the current polynomial

public void Print()

{ … }

public bool Order(Object obj)

{ … }

}

Skills: Coding

See more: coding assignments python, computer programming assignments, coding assignment interview, programming interview take home test, coding challenge interview, take home coding challenge, coding assignment help, take home coding challenge example, coding print, print report coding, coding print fingerprint database, java coding uni assignment, set print size crystal report coding, doubly linked list assignment, print circular linked list, java assignment doubly linked list, programming assignment linked list, java linked list assignment, linked list coding implementation, assignment doubly linked list oops

About the Employer:
( 0 reviews ) Nairobi, Kenya

Project ID: #17961133

Awarded to:

vasundharamehta

I have vast experience in Java and have done similar work before. If there are any other instructions to be given please provide them.

$30 USD in 2 days
(1 Review)
1.0

6 freelancers are bidding on average $93 for this job

it2051229

Hi there, I do Java programming. I checked your initial code and I would like to do this project if given the opportunity. Let me know if you are interested so I can have further details.

$30 USD in 1 day
(5 Reviews)
3.1
creativesoft7

Dear Prospect Hiring Manager. Thank you for giving me a chance to bid on your project. i am a serious bidder here and i have already worked on a similar project before and can deliver as u have mentioned I am a Fu More

$208 USD in 7 days
(0 Reviews)
0.0
DevStar925

How are you? I am c++ expert. I read your description. I can do it soon. I want to discuss more on chat. Thanks

$155 USD in 3 days
(0 Reviews)
0.0
xinglong717

Hi. I have read your description and have interests in your project. I would like to have a discussion with chat to get more about your project. Thanks.

$100 USD in 3 days
(0 Reviews)
0.0
kalyanprakash4

keen to do it, please discuss

$35 USD in 3 days
(0 Reviews)
0.0