Page 96 - C++
P. 96

char Name[20];

               float Marks;

        protected:

               void result( );

        public:

               Student ( );

               void Register ( );

               void Display( );

        };

        class Faculty

        {

               long FCode;
               char FName [20];


        protected:
               float Pay;


        public:
               Faculty ( );

               void Enter( );

               void Show( );

        };

        class Course: public Student, private Faculty

        {

        long CCode [10]; char CourseName [50];

        char StartDate [8], EndDate [8];

        public:

        Course( );

        void Commence ( );

        void CDetail ( );

        };

        (i) Which type of inheritance is illustrated in the above C++ code?

        (ii) Write the names of all the data members, which is /are accessible from member function Commence of
        class Course.

        (iii) Write the names of member functions, which are accessible from objects of class Course.
   91   92   93   94   95   96   97   98   99   100   101