Related QuestionsVIEW ALL [9]
Write the definition of a class Photo In C++ with the following description:
Private Members
- Pno //Data member for Photo Number (an integer)
-Category //Data.member for Photo Category (a string)
- Exhibit I // Data member for Exhibition Gallery (a string)
- FixExhibit //A member function to assign Exhibition Gallery as per Category as shown in the following table
Category | Exhibit |
Antique | Zaveri |
Modern | Johnsen |
Classic | Terenida |
Public Members
-Register() //A function to allow user to enter values Pno I category and call FixExhibi t () function
- ViewAll() //A function to display all the data members
Write the definition of a class CONTAINER in C++ with the following description.
Private Members
-Radius, Height // float
- Type // int (1 for Cone, 2 for Cylinder)
- Volume // float
- CalVolume() // Member function to calculate
// volume as per the Type
Type | Formula to calculate Volume |
1 | 3.14*Radius*Height |
2 | 3.14*Radius*Height/3 |
Public Members
- GetValues () //A function to allow a user to enter of Radius, Height and Type. Also, call function CalVolume() from it.
- ShowAll () // A function to display Radius, Height, Type and Volume of Container