> How to create class employee?

How to create class employee?

Posted at: 2014-12-18 
Class [employee]{

Int id, age;

String name;

Char sex;

Double rate,hour,salary;

Double totalIncome(){.........}

Void input(){…………}

Void output(){…………}

//contructor?

}

Class employee

{

char ename[15];

int age,salary;

}

#include

#include

#include

using namespace std;

class EMPLOYEE

{

public:

EMPLOYEE();//

EMPLOYEE(string name, int salary);//

public:

string name;//name to be input

int salary;//salary to be input

public:

int enter_values();

int output_values();

int NEW_SALARY( int percentage_raise);

};

//default constructor

EMPLOYEE::EMPLOYEE()

{

name = "";

salary = 0;

}

//constructor with name/salary variables

EMPLOYEE::EMPLOYEE(string NAME, int SALARY)

{

name= NAME;

salary= SALARY;

}

//name and salary to be input...

int EMPLOYEE::enter_values()

{ cout<<"Enter name and salary: ";

cin>> name;

cin>>salary;

}

//output

int EMPLOYEE::output_values()

{ cout<<"Name: "<
cout<<"Salary: "<
}

//

int EMPLOYEE::NEW_SALARY(int percentage_raise)

{

EMPLOYEE updated_salary;

if ( percentage_raise >= 0){salary= salary *(percentage_raise/100);

}

else if(percentage_raise< 0)

{ cout<<"Error Message"<
}

return percentage_raise;

}

int main()

{

EMPLOYEE employees[100];

EMPLOYEE.NEW_SALARY();

int percent= 0;

int i;

for(i =0 ;i<100 ; i++)

{ employees[i]=EMPLOYEE();

employees[i].enter_values();

employees[i].name;

employees[i].salary;

employees[i].output_values();

cout<<"How much should the salary be raised by?"<
cin>>percent;

cout<
}

}

Class [employee]{

Int id, age;

String name;

Char sex;

Double rate,hour,salary;

Double totalIncome(){.........}

Void input(){…………}

Void output(){…………}

//contructor?

}