//File:	employee.cpp
#include <fstream>
#include <string>
using namespace std;

class employee
{
	private:
		string	name;
		string 	ssNum;
		int	age;
		double	salary;
		
	public:
		//Constructors
		employee()
		{
			name	=	"";
			ssNum	=	"";
			age	=	0;
			salary	=	0.0;
		}
		
		employee(string n, string s, int a, double rate)
		{
			name	=	n;
			ssNum	=	s;
			age	=	a;
			salary	=	rate;
		}
		
		//Mutators
		void raise (const double & x) //gives x % raise to employee
		{
			salary += salary * x/100;
		}		
		
		//I/O Facilitators
		void readEmployee(istream & in)
		{
			if (in == cin)
			{
				cout << "Employee name: ";
				cin >> name;
				cout << "Employee SS Number: ";
				cin >> ssNum;
				cout << "Employee age: ";
				cin >> age;
				cout << "Employee salary: ";
				cin >> salary;
				cout << endl;
			}
			else
				in >> name >> ssNum >> age >> salary;
		}
		
		void print ()
		{
			cout	<< "Employee: " << '\t' << name << '\n'
				<< "SS Number: " << '\t' << ssNum << '\n'
				<< "Age: " << "\t\t" << age << '\n'
				<< "Salary: " << '\t' << salary << '\n' << endl;
		}
};
