Page 350 - C++
P. 350

CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
                                       (2018-2019 Sub Code: 083       Paper Code: 91)

                                  the Volumes with correct Formulae

                    (d)    Answer the questions (i) to (iv) based on the following:                           4
                           class Teacher
                           {
                             int   TCode;
                           protected:
                             char  Name[20];
                           public:
                             Teacher();
                             void  Enter(); void Show();
                           };
                           class Course
                           {
                             int ID;
                           protected:
                             Char  Title[30];
                           public:
                             Course();
                             void  Initiate();
                             void  Display();
                           };
                           class Schedule: public Course, private Teacher
                           {
                             int DD,MM,YYYY;
                           public:
                             Schedule();
                             void Start();
                             void View();
                           };
                           void main()
                           {
                              Schedule S;
                           }

                     (i)   Which type of Inheritance out of the following is illustrated in the above example?
                          Single Level Inheritance,  Multilevel Inheritance, Multiple Inheritance
                    Ans  Multiple Inheritance


                          (1 Mark for writing correct option)

                     (ii)  Write the names of all the members, which are directly accessible by the member
                          function View() of class Schedule.


                    Ans  Start(), DD, MM, YYYY
                          Display(), Initiate(), Title
                          Enter(), Show(), Name
                          View()                // Optional

                          (1 Mark for writing all correct member names )

                                                        Page #8/35
   345   346   347   348   349   350   351   352   353   354   355