-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnewSeven_manager.cpp
More file actions
39 lines (26 loc) · 1.17 KB
/
Copy pathnewSeven_manager.cpp
File metadata and controls
39 lines (26 loc) · 1.17 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
35
36
37
38
39
#include <string>
#include <iostream>
#include <cstdlib>
#include "newSeven_manager.h"
using namespace std;
int main()
{
//instantiate an object of type Manager
Manager manager(60560, 5500, 2800, 3100,0.14);
//access the values of the object
double currentBasicSalary = manager.getBasicSalary();
cout<<currentBasicSalary;
//double currentPension = employee.getPension();
//double currentMedicalAid = employee.getMedicalAid();
//float currentTaxPercentage = employee.getTaxPercentage();
manager.Display();
double currentGrossPay = manager.calcGrossPay(manager);
cout <<endl<<"Current gross pay: "<<currentGrossPay;
double currentDeductions = manager.calcDeductions(Manager manager);
cout<<"\nDeductions: "<<currentDeductions;
double currentAllowance = manager.getAllowance();
double currentTaxAmount = manager.calcTax(currentGrossPay, currentDeductions, currentAllowance);
cout<<endl<<"tax: "<<currentTaxAmount;
double netSalary = currentGrossPay - currentTaxAmount - currentDeductions;
cout <<"\nNetSalary after medical aid, pension and tax has been paid: "<<netSalary;
}