Write a class Teacher that contains the attribute teacher name, age and address. It also contains member function to input and display its attributes. Write another class Author Write another class Writer that contains the attributes writer name, address and number of books written by him. It also contains member functions to input and display its attributes. Write a third class Scholar that inherits both Teacher and Writer classes. Note: Solve this using c++
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Write a class Teacher that contains the attribute teacher name, age and address. It also
contains member function to input and display its attributes. Write another class Author Write
another class Writer that contains the attributes writer name, address and number of books written
by him. It also contains member functions to input and display its attributes. Write a third class
Scholar that inherits both Teacher and Writer classes.
Note: Solve this using c++
Step by step
Solved in 3 steps with 2 images