Experiment No 4 Oop
Experiment No 4 Oop
4
Code :-
#include <iostream>
#include <string>
class Person {
protected:
string name;
int age;
public:
name = pname;
age = page;
void displayPersonDetails() {
};
protected:
int empID;
public:
empID = id;
}
void displayEmployeeDetails() {
};
private:
string department;
public:
department = dept;
void displayManagerDetails() {
};
int main() {
Manager mgr;
mgr.displayManagerDetails();
return 0;
}
Output :-