Question: using c++ Write the implementation of class called point. This class represents a 3D point that have x,y and z coordinates. For this class you
using c++

Write the implementation of class called point. This class represents a 3D point that have x,y and z coordinates. For this class you must provide the following member functions: 1. Default constructor to set x,y and z to random number in the range [100,100] if they are not initialized when the object is created. 2. Copy constructor to provide the necessary code for copying one point to another and print "Copying Done" when the operation performed. 3. Overloaded the assignment operator. 4. Overloaded \% operator , the function should operates on the sum of all coordinates. 5. Overloaded - operator as a friend function. (increment all coordinates) 6. Overloaded / operator as non-friend function, make sure no exception will be thrown during the program execution (the increment is for all coordinates). 7. Overloaded [] operator to get x coordinate if the index is between 0 and 10,y coordinate if the index is between 11 and 20,z coordinate if the index is between 21 and 30 . For out of range indexes return error code (negative number that is less than 100 ). - As non member function: a. Overload the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
