Creating a class and some member functions

Hello.
Please if somebody has the time and willingness to do this program in C++ I would be very happy and grateful.

Define a class Cubic that stores the coefficients of a polynomial of degree 3 in a dynamically allocated array of doubles. Supply the "big three" memory management functions. Use this class to demonstrate
(a) the difference between initialization
Cubic s;
Cubic t = s;
and assignment operation
Cubic s;
Cubic t;
s = t;
(b) the fact that all constructed objects are automatically destroyed
(c) the fact that the copy constructor is invoked if an object is passed by value to a function
(d) the fact that the copy constructor is not invoked when a parameter is passed by reference
(e) the fact that the copy constructor is used to copy a return value to the caller.
Supply a member function which calculates the value of the polynomial for a given argument value. Overload + and - operators for addition and subtraction of two polynomials and the unary operator * which return true or false when the corresponding cubic function has or has not critical points. (We say that a function f(x) has a critical point z when its derivative has value null at this point, i.e. f '(z) = 0.) Overload the stream operators << and >>. Demonstrate all these functions and operators.
We don't "do" programs here, sorry. Or on any other insane geek forum. The tutorials here:
http://cplusplus.com/doc/tutorial/

Should help you prove all these statements.

-Albatross
Go to the jobs section and offer money for it... I´d do it for 5€ xD...
You are so evil :/
Actually, if we were evil, we'd give you a solution that you'd have no hope of understanding. If we require you to do your work, you'll a) learn something and b) be able to explain exactly what your code does should your teacher confront you about it. This is actually all for your own good.

-Albatross
What is the point in taking a course if you are not going to do the assignments? The teacher is not trying to be evil or harass you (i hope). By doing the exercise you will also be learning how to compile code and setup it takes. Maybe you might also meet the debugger ;-)

So we are, as Albatross said, actually helping you by not developing the code for you.
I would happily start it if it wasn't written in Chinese...
What part don't you understand we can help clarify the task.
The coefficients of a polynomial of degree 3 - this should be a,b,c,d from a.x^3+b.x^2+c.x+d, right? And what is it meant by dynamically allocated array. And what "big three"?
Topic archived. No new replies allowed.