Results 1 to 2 of 2

Thread: Polynomial class?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Posts
    1

    Polynomial class?

    Hello everybody,

    I hope somebody here can help me out. I got a program to do for class but for some reasion I just can't put it togther. For those of you with C++ How to Program book third edition by Deitel & Deitel its Ex 8.19 p575...

    Those without the book here is the question:

    Develop class Polynomial. This internal representation of a Polynomial is an array of terms. Each term contains a coefficient and an exponent. The term
    2x^4
    has a coefficient of 2 and an exponent of 4. Develop a full class containing proper constructor and destructor functions as well as set and get functions. The class should also provide the following overloaded operator capabilities:
    1. Overload the addition operator (+) to add two Polynomials.
    2. Overload the subtraction operator (-) to subtract two Polynomials.
    3. Overload the assignment operator to assign one Polynomial to another.
    4. Overload the multiplication operator (*) to multiply two Polynomials.
    5. Overload the addition assignment operator (+=), the subtraction assignment operator (-=), and the multiplication assignment operator (*=).

    well people I just can't put my head into this. any help is apresiated... hints examples anything... and if your free I really need it during these next couple of days...

    Thanks in advance for any help......

  2. #2
    Member
    Join Date
    Feb 2001
    Posts
    57

    Check out this page...

    http://www.planet-source-code.com/xq...s/ShowCode.htm

    http://turing.gcsu.edu/~gadkins1/poly.html

    and do a search for "c++ classes" and "operator overloading" on a site like google.



    chilibean
    Last edited by chilibean; Jun 1st, 2001 at 09:12 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width