Employee::Employee(string emp_name, double
init_salary)
{ name = emp_name;
salary = init_salary; }
* Полета с данни - обекти от други класове
class Employee {
public:
Employee(string emp_name,
double init_salary,
int arrive_hour, int leave_hour);
...
private:
string name;
double salary;
Time arrive;
Time leave;
};
Employee(string emp_name, double init_salary,
int arrive_hour, int leave_hour)
{ name = emp_name;
salary = init_salary;
arrive = Time(arrive_hour, 0, 0);
leave = Time(leave_hour, 0, 0);
}