Posts

Showing posts with the label Problem inheritance

Problem 1 Inheritance OOP

Image
Problem:                   You have to make three classes: Person class Student class Employee class Criteria:                 Person class is the parent class or base class. Student class is derived or child of Person class and Employee class is also derived or child of Person class.          Member variables and methods/functions: Person class:                   Person class must have 3 private member variables  Name CNIC Address                And two public member functions: get set   To get and set values of member variables. Student class:                Student class must have 4 private member variables: RollNo Sub1 Sub2 Sub3               Three public member functions/methods: get1 set1  calcG...