Write a c program that allows the user to create a vector


Write a C++ program that allows the user to create a vector of 2D and 3D geometric figures then computes their areas and volumes if possible. Elements in your vectors are made of objects of each class that can be instantiated.

-Your 3D figures must be either a cylinder or a sphere or a cube. Each of These figures have a center which is identified by a point with 3 coordinates (x,y,z), and radius(for cylinder and sphere),and a height(for cylinder) and the length of a side(for cube). A 3D figure has a area and a volume.

-Your 2D figures must be either parallelogram or a rectangle, or a square, or a triangle or a trapezoid. They all can be represented by a point in the bottom left corner(coordinates x,y,z) and the appropriate dimensions needed for computation their areas. Example length and width for rectangle, base and height for triangle etc..

-Your program should establish inheritance relation between some figures. Example 2D and 3D figures are all geometric figures. A rectangle is a parallelogram. A square is a rectangle.

-You must also have virtual methods and abstract classes.

You must create 3 different files for this assignment:

(1) An interface file where all the classes and their appropriate methods are declared
(2) An implementation file where all the methods of the interface file are defined.
(3) A driver file or client program where a user can create a vector shapes then compute their area and volume if possible. For each shape, you must also point out their position in a 3D coordinate.

Detailed Question: In this homework, I am to use abstract class, virtual methods,, template, vector, inheritance.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a c program that allows the user to create a vector
Reference No:- TGS01399973

Expected delivery within 24 Hours