Jump to content
منتدى البحرين اليوم

Recommended Posts

help :ssm11::ssm11::ssm11:

 

 

Consider the following definitions for class Cube:

class Cube {

private :

double x,y,z;

public:

…..

};

Complete the class Cube by adding the following functions. Include for the functions in part

a and b both the prototype and the functions code:

a) Define a non member function that overloads the operator / which divides the sum of the

members x, y, and z in the first object by the sum of the corresponding members in the

second object and return the result as double.

 

 

 

 

b) Define a member function that overload the operator != which test if the volume of the

first object is not equal the volume of the second object. The volume of a cube is x*y*z.

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...