24.5 PERSONS
Large number of applications will require an object of type person.
class Person
{ private : string20 name; int age public: Person() ; Person( string name1, int age1); void init( string name1, int age1); void show(); } ;
class Player : public Person
{ Private : int runs; static string logo ; public: Player(); Player(string name1, int age1 ,int runs1 ); void init(string name1, int age1 ,int runs1 ); void show() ; }
class Student : public Person
{ private : int rollnum ; int marks; public: Student(); void init(string name1, int age1 ,int rn1 , int marks1 ); void show(); };
Basically class employee can be derived from class person. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access