1. Write a program in which you create a const whose value is determined at runtime by reading the time when the program starts (hint: use the
2. Rewrite program 1 using an inline function to perform the calculation. In the test plan for this program (actual results section), compare the time required by this program to execute against the time required by the first (non-inline) program.
3. Write a program that creates a class hierarchy for simple geometry.
a. Start with a Point class to hold x and y values of a point. Overload the >> operator to print point values and the + and operators to add and subtract point coordinates (hint: keep x and y separate In the calculation).
b. Create a base class Shape which will form the basis of your shapes. The Shape class will contain functions to calculate area and circumference of the shape, plus provide the coordinates (Points) of a rectangle that encloses the shape (a bounding box). These will be overloaded by the derived classes as necessary. Create a display() function that will display the name of the class plus all stored information about the class (including area, circumference, and bounding box).
c. Build the hierarchy by creating the Shape classes Circle, Square, and Triangle. For these derived classes, create default constructors and constructors whose arguments can initialize the shapes appropriately using the correct number of Point objects (i.e., Circle requires a Point center and a radius; Square requires four Point vertices, while Triangle requires three Point vertices).
d. In main(), create one instance each of the following: a Circle with a radius of 23, a Square with sides 25, and a Triangle with sides 10, 20, 30. Define all of them so that the origin (0,0) is somewhere within each object. Display the information from each object.