Question: c++ code please Problem 2 - Classes, inheritance, overloading (50 pts) The aim here is to manipulate 3D objects in space. a) Define a class

c++ code please
Problem 2 - Classes, inheritance, overloading (50 pts) The aim here is to manipulate 3D objects in space. a) Define a class Shapes that has a constructor that outputs the message "I am a 3D object when an object of the class is created. Each object of the class has 3 private data members (of type float): the coordinates of the gravity center of the object. (10 pts) b) Implement a subclass Spheres of the class Shapes, where an object has an additional private data member: radius. (5 pts) You are also asked to define and implement the following methods: (i) Constructor that initializes the data members of the object. (5 pts) (ii) computeVolume () that returns the volume of the sphere. (5 pts) (iii) moveSphere () that moves the sphere to a different location in the space. Note that this method requires 3 parameters to specify the new coordinates of the object. (5 pts) (iv) Overlap () that tests whether 2 spheres have a common intersection. (5 pts) c) Overloading operators: (10 pts) (i) Overload the operator
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
