A corporation named XYZ needs a program to calculate how much to pay their part-time and full-time employees. For full-time employees, the employees get paid time and a half for any hours over 40 that they work in a single week. For example, if an employee works 45 hours, they get 5 hours of overtime, at 1.5 times their base pay. The base should be at least RS. 120 an hour. This XYZ Corporation requires that an employee not work more than 60 hours in a week. For part-time employees, they get paid time and a half for any hours over 30 that they work in a single week. For example, if an employee works 33 hours, they get 3 hours of overtime, at 1.5 times their base pay. Their base pay should not be less than RS. 110 an hour. This XYZ Corporation requires that an employee not work more than 35 hours in a week. To sum up: An employee gets paid (hours worked) × (base pay) for each hour up to 30 or 40 hours depending upon employee type. For every hour over 30 or 40 depending upon employee type, they get overtime = Overtime hours × (base pay) × 1.5. The base pay must not be less than the minimum wage (RS. 110 or RS. 120 an hour depending upon employee type). The working hours must not exceed 35 or 60 depending upon employee type. Write a program that ask user to enter Employee Name, Employee type (full-time/pat-time), working hours and base pay. You need to write the following methods: Write a method that validates the input that if it is in given range or not. public static boolean isValidInput(Char empType, int workingHours, double basePay) A method that calculate pay based on given parameters. public static double calculatePay(Char empType, int workingHours, double basePay) A method to calculate overtime pay. This method should be called from calculatePay if and when required. public static double calculateOverTimePay(int OverTimeHours, double basePay)A method to display informationpublic static void displayInfo(String empName, int workingHours, double totalPay)
A corporation named XYZ needs a program to calculate how much to pay their part-time and full-time employees. For full-time employees, the employees get paid time and a half for any hours over 40 that they work in a single week. For example, if an employee works 45 hours, they get 5 hours of overtime, at 1.5 times their base pay. The base should be at least RS. 120 an hour. This XYZ Corporation requires that an employee not work more than 60 hours in a week. For part-time employees, they get paid time and a half for any hours over 30 that they work in a single week. For example, if an employee works 33 hours, they get 3 hours of overtime, at 1.5 times their base pay. Their base pay should not be less than RS. 110 an hour. This XYZ Corporation requires that an employee not work more than 35 hours in a week. To sum up: An employee gets paid (hours worked) × (base pay) for each hour up to 30 or 40 hours depending upon employee type. For every hour over 30 or 40 depending upon employee type, they get overtime = Overtime hours × (base pay) × 1.5. The base pay must not be less than the minimum wage (RS. 110 or RS. 120 an hour depending upon employee type). The working hours must not exceed 35 or 60 depending upon employee type. Write a program that ask user to enter Employee Name, Employee type (full-time/pat-time), working hours and base pay. You need to write the following methods: Write a method that validates the input that if it is in given range or not. public static boolean isValidInput(Char empType, int workingHours, double basePay) A method that calculate pay based on given parameters. public static double calculatePay(Char empType, int workingHours, double basePay) A method to calculate overtime pay. This method should be called from calculatePay if and when required. public static double calculateOverTimePay(int OverTimeHours, double basePay)A method to display informationpublic static void displayInfo(String empName, int workingHours, double totalPay)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
A corporation named XYZ needs a program to calculate how much to pay their part-time and full-time employees.
For full-time employees, the employees get paid time and a half for any hours over 40 that they work in a single week. For example, if an employee works 45 hours, they get 5 hours of overtime, at 1.5 times their base pay. The base should be at least RS. 120 an hour. This XYZ Corporation requires that an employee not work more than 60 hours in a week.
For part-time employees, they get paid time and a half for any hours over 30 that they work in a single week. For example, if an employee works 33 hours, they get 3 hours of overtime, at 1.5 times their base pay. Their base pay should not be less than RS. 110 an hour. This XYZ Corporation requires that an employee not work more than 35 hours in a week.
To sum up:
An employee gets paid (hours worked) × (base pay) for each hour up to 30 or 40 hours depending upon employee type.
For every hour over 30 or 40 depending upon employee type, they get overtime = Overtime hours × (base pay) × 1.5.
The base pay must not be less than the minimum wage (RS. 110 or RS. 120 an hour depending upon employee type).
The working hours must not exceed 35 or 60 depending upon employee type.
Write a program that ask user to enter Employee Name, Employee type (full-time/pat-time), working hours and base pay. You need to write the following methods:
Write a method that validates the input that if it is in given range or not.
public static boolean isValidInput(Char empType, int workingHours, double basePay)
A method that calculate pay based on given parameters.
public static double calculatePay(Char empType, int workingHours, double basePay)
A method to calculate overtime pay. This method should be called from calculatePay if and when required.
public static double calculateOverTimePay(int OverTimeHours, double basePay)A method to display informationpublic static void displayInfo(String empName, int workingHours, double totalPay)
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY