worker class c 2b 2b

Solutions on MaxInterview for worker class c 2b 2b by the best coders in the world

showing results for - "worker class c 2b 2b"
Linden
14 May 2020
1#ifndef EMPLOYEE_H
2#define EMPLOYEE_H
3#include <string>
4using namespace std;
5 
6class Employee
7{
8private:
9    string name;        // Employee name
10    string number;      // Employee number
11    string hireDate;    // Hire date
12 
13public:
14    // Default constructor
15    Employee()
16        { name = ""; number = ""; hireDate = ""; }
17 
18    // Constructor
19    Employee(string aName, string aNumber, string aDate)
20        { name = aName; number = aNumber; hireDate = aDate; }
21 
22    // Mutators
23    void setName(string n)
24        { name = n; }
25 
26    void setNumber(string num)
27        { number = num; }
28 
29    void setHireDate(string date)
30        { hireDate = date; }
31 
32    // Accessors
33    string getName() const
34        { return name; }
35 
36    string getNumber() const
37        { return number; }
38 
39    string getHireDate() const
40        { return hireDate; }
41};
42 
43#endif
44
queries leading to this page
worker class c 2b 2bworker class c 2b 2b