Instructions Write a program to illustrate how to use the temporary class, designed in Exercises 13 and 14 of this chapter. Your program must contain statements that would ask the user to enter data of an object and use the setters to initialize the object. The header file for the class temporary from Exercise 13 has been provided. Use 3.1416 as the value of PI. An example of the program is shown below: Enter object name (rectangle, circle, sphere, or cylinder): circle Enter object's dimensions: rectangle (length and width) circle (radius and 0) sphere (radius and 0) cylinder (base radius and height) 10 0 After setting myObject: circle: radius = 10.00, area = 314.16 need main.ccp temporary.h temporarylmpccp
Instructions
Write a program to illustrate how to use the temporary class, designed in Exercises 13 and 14 of this chapter. Your program must contain statements that would ask the user to enter data of an object and use the setters to initialize the object.
The header file for the class temporary from Exercise 13 has been provided.
Use 3.1416 as the value of PI.
An example of the program is shown below:
Enter object name (rectangle, circle, sphere, or cylinder): circle Enter object's dimensions: rectangle (length and width) circle (radius and 0) sphere (radius and 0) cylinder (base radius and height) 10 0 After setting myObject: circle: radius = 10.00, area = 314.16
need
main.ccp
temporary.h
temporarylmpccp
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images