Logo 
Search:

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
exponent).
? Public function to print the polynomial in the elegant format: 23x

? Overloaded public function to allow adding two polynomials
poly3=poly1+poly2

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

? 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";

Share: 

 

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.




Tagged: