Question: For this program you will declare a class for 3 dimensional solids and perform some arithmetic operations objects of that type. Overall Procedure: You will
For this program you will declare a class for 3 dimensional solids and perform some arithmetic operations objects of that type. Overall Procedure: You will declare a three d class as follows: class three d int "x, "y, z public: three do : three d(int i, int j, int k) x = new int; y = new int; z- new int; int get x 0 freturn *x;) int get y 0 return y:: int get z0 freturn *z;) /- as friend friend three_d operator- (three d &opl, three d op2); l assignment as member three d operator(three d &op2); I/opl is implied // prefix ++ as member three d three d:operator++0: // output stream as friend friend ostream &operator
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
