Professional Documents
Culture Documents
ROLL NO:FA19-BEE-098
CODE:
// MAHNOOR NADEEM //
#include <iostream>
class Organization{
protected :
string name,scale;
float salary,newsalary;
int i;
public :
void input(){
cin>>name;
cin>>scale;
void display(){
void increment(){
cin>>i;
void addition(){
};
public :
void input(){
Organization :: input();
}
void display(){
Organization :: display();
};
public :
void input(){
Organization :: input();
void display(){
Organization :: display();
};
public :
void input(){
Organization :: input();
void display(){
Organization :: display();
};
int main()
int k = 0;
Management m1;
Facility f1;
Staff s1;
cin>>k;
switch(k) {
case(1) :
f1.input();
f1.display();
f1.increment();
f1.addition();;
break;
case(2) :
m1.input();
m1.display();
m1.increment();
m1.addition();
break;
case(3) :
s1.input();
s1.display();
s1.increment();
s1.addition();
break;
default :
return 0;
}
CRITICAL ANALYSIS:
In above programe,I havr designed a basic class organization which is consist of derived class
such as management, faculty and staff.User has been given choice to choose whether he wants
to enter or display employee's data.Also salary conditions are managed.At the end,I have
displayedtheir scales and increments.