these are my homeworks please help me...

S8. create a class with the name complex. For that class, the requirements are;

-define variables as relevant as possible for the above class ( re and im of type double ) ;
-the class constructor ;
-function display ;
-functions to return real and imaginary part ;
-overload the operator+= ;
-overload the operator + ;
-overload the operator * ;
-use the class in the main program, in which objects from the above class must be declared and the methods (of the respective class) above declared must be used

S11. create a class with the name triangle. For that class, the requirements are;

-define variables as revelant as possible for the above class (float L1, L2, L3 );
-the class constructor ;
-the function which reads the lenghts of the sides of the triangle from the keyboard ;
-function verify_triangle_existence() ;
-function display ;
-function for the perimeter calculus ;
-function for the area calculus

-use the class in the main program in which objects from the above class must be declared and the methods (of the respective class) above declared must be used

Kole12 commented: HW helper +0

Recommended Answers

All 3 Replies

Member Avatar for iamthwee

I voted 8.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.