CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Threaded View

  1. #1
    Join Date
    Apr 2007
    Posts
    4

    Exclamation Help with a Polynomial Program

    College student here - I'm in Comp Sci II. Just switched professors and feel like I missed out on a lot!! I feel like I missed a big chunk by switching professors and now am very lost.
    I'm only just learning about classes and objects, so sorry if some of my questions and mistakes are amateur.
    I've put a couple hours into trying to figure out how all of this works for my assignment and attached is what I have so far, which I know is basically a skeleton of what I need. It has all the member functions that I'm suppose to implement and some of them have coding in them.
    But man, pass that I'm just clueless!!
    Any help will be majorly appreciated, since as I said, I feel extremely out of the loop right now.

    Basically with what I have right now, I'm suppose to
    ~~~~
    1)
    Write a client program that tests my class Polynomial by allowing the user to input two polynomials P(x) and Q(x) and compute and display their sum, difference, product, and composition as well as evaluate the input polynomial P(x) at a value given by the user.

    2)
    Write a function that computes the derivative of a polynomial P(x):
    Polynomial Derivative(const Polynomial &P)

    3)
    Write a member function that returns the remainder when the polynomial is divided by a polynomial Q:

    Polynomial Modulo(const Polynomial &Q)

    Also, include an auxiliary operator overload function for modulo, i.e., that overloads %.
    ~~~~~~

    I'm fairly confident in my header and implementation file, but my main file is most likely wrong with what little is there.
    I just need guidance on where to go from here :-\ I really want to understand what's going on here, as I know these are important components.

    Thanks everyone!
    Attached Files Attached Files

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

Featured