-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmployee.cpp
More file actions
34 lines (31 loc) · 1.1 KB
/
Employee.cpp
File metadata and controls
34 lines (31 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// including the Employee class header file
#include "Employee.h"
using namespace std;
// In this function, we set all attributes to empty, 0, or \0
// Inputs: none
// Outputs: none
Employee::Employee()
{
// setting all attributes to empty, 0, or \0
employeeID = "";
lastName = "";
firstName = "";
birthDate = "";
gender = '\0';
startDate = "";
yearlySalary = 0;
}
// In this function, we set all attributes to the arguements passed during the function call
// Inputs: string employeeIDUI, string lastNameUI, string firstNameUI, string birthDateUI, char genderUI, string startDateUI, double yearlySalaryUI
// Outputs: none
Employee::Employee(string employeeIDUI, string lastNameUI, string firstNameUI, string birthDateUI, char genderUI, string startDateUI, double yearlySalaryUI)
{
// setting all attributes to the arguements passed during the function call
employeeID = employeeIDUI;
lastName = lastNameUI;
firstName = firstNameUI;
birthDate = birthDateUI;
gender = genderUI;
startDate = startDateUI;
yearlySalary = yearlySalaryUI;
}