Saved Bookmarks
| 1. |
Answer the questions (i) to (iv) based on the following:class Faculty{int FCode;protected:char FName[20];public:Faculty();void Enter();void Show();};class Programme{int PID;protected:char Title[30];public:Programme();void Commence();void View();};class Schedule: public Programme, Faculty{int DD,MM,YYYY;public:Schedule();void Start();void View();};void main(){Schedule S; //Statement 1___________ //Statement 2}(i) Write the names of all the member functions, which are directly accessible by the object S of class Schedule as declared in main() function.(ii) Write the names of all the members, which are directly accessible by the memberfunction Start( ) of class Schedule.(iii) Write Statement 2 to call function View( ) of class Programme from the object S of class Schedule.(iv) What will be the order of execution of the constructors, when the object S of class Schedule is declared inside main()? |
|
Answer» (i) Start(), Schedule::View(), Commence(), Programme::View() (ii) DD,MM,YYYY, Schedule::View() Title, Commence( ), Programme::View() Fname, Enter(), Show() (iii) S.Programme::View( ); (iv) Programme( ), Faculty( ), Schedule( ) |
|