C Programming Forum

Ask Question   UnAnswered
Home » Forum » C Programming       RSS Feeds

polynomiallinked list help!

  Asked By: Roro    Date: Nov 04    Category: C Programming    Views: 2310

In this assignment, you will implement a Polynomial linked list, the coefficients and exponents of the
polynomial are defined as a node. The following 2 classes should be defined.
1.Class Node
? Private member variables: coefficient (double), exponents (integer), and next pointer.
? Setter and getter functions to set and get all member variables
? constructor
2. Class PolynomialLinkedList
? Private member variable to represent linked list (head)
? Constructor
? Public Function to create a Node
? Public function to insert the Node to the linked list (sorted polynomial according to the
? Public function to print the polynomial in the elegant format: 23x

? Overloaded public function to allow adding two polynomials

? Overloaded public function to allow negating (!) the sign of any polynomial

? Overloaded public function to allow multiplying two polynomials
? Public function to evaluate polynomial based on an input
If x=1, then the value of this polynomial ...

3. Main
? Main menu to test the following tasks
? cout << "1. Create polynomial \n";
? cout << "2. Print polynomial \n";
? cout << "3. Add two polynomilas \n";
? cout << "4. Negate polynomial \n";
? cout << "5. Multiply two polynomials \n ";
? cout << "6. Evaluate polynomial \n ";
? cout << "7. Exit \n";



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on polynomiallinked list help! Or get search suggestion and latest updates.