Bug 381

Summary: Not make sense to calculate yearly / monthly summary for part-time / perm staff
Product: CS3343 - Group 12 - HR Management System Reporter: Lam Tsz Yau <tszyaulam4-c>
Component: CalculateAssignee: Lam Tsz Yau <tszyaulam4-c>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: Macintosh   
OS: Mac OS   

Description Lam Tsz Yau 2020-10-31 13:18:28 HKT
Inside Employee.txt, Simon is a PT Associate:
5, Simon, IT, PartTimeAssociates, 1, 30

Inside DutyRoster.txt, he works for 3 days in Oct, 2020:
5, 8/10/2020, 9:30, 18:30, 9:30, 17:30
5, 9/10/2020, 9:30, 18:30, 9:30, 17:30
5, 10/10/2020, 9:30, 18:30, 9:30, 17:30

As a Part-time staff, he shouldn't be able to calculate his yearly salary.
Here is what we got as an output if we calculate his yearly salary.

Steps to reproduce:
1. Run Main.java
2. type "calYearlySal|5|2020"
3. Press Enter

Output:
Welcome to the HR Management System!
You may type "help" to get the list of allowed commands!
> calMonthlySal|5|10|2020
Employee Simon's monthly salary is $1440.0
> calYearlySal|5|2020
Employee Simon's yearly salary is $1440.0
Comment 1 Lam Tsz Yau 2020-11-14 13:24:35 HKT
Solved