This paper concentrates on the primary theme of C++ in which you have to explain and evaluate its intricate aspects in detail. In addition to this, this paper has been reviewed and purchased by most of the students hence; it has been rated 4.8 points on the scale of 5 points. Besides, the price of this paper starts from £ 40. For more details and full access to the paper, please refer to the site.
For this program you will declare a class for 3 dimensional solids and perform some arithmetic operations objects of that type.
You will declare athree_d class as follows:
int *x, *y, *z;
int get_x ()
int get_y ()
int get_z ()
// – as friend
friendthree_doperator- (three_d &op1,three_d op2);
// assignment as member
three_doperator=(three_d &op2);// op1 is implied
// prefix ++ as member
// output stream as friend
You will also have an overloaded addition of two three_d objects implemented as a free function.
You must use an overloaded output stream operator to print results.
In main, you will declare twothree_dobjects,three_d_a andthree_d_b. Then you will exercise your code to produce the following output:
Coordinates three_d_a are:
1, 2, 3
Coordinates three_d_b are:
0, 2, 1
Coordinates of three_d_a after adding three_d_b are:
1, 4, 4
Coordinates three_d_a after subtracting three_d_b are:
1, 2, 3
Coordinates three_d_a after adding 1 to each member using a prefix ++ are:
2, 3, 4