Task Performance A Simple Payroll Program Objective: At the end of the activity, the students should be able to: Create a program that exhibits inheritance and polymorphism. Software Requirements: Latest version of NetBeans IDE Java Development Kit (JDK) 8 Procedure: 1. Create four (4) Java classes. Name them RunEmployee, Employee, FullTimeEmployee, PartTimeEmployee. The RunEmployee class shall contain the main method and will be used to execute the program. 2. Write a simple payroll program that will display employee's information. Refer to the UML Class Diagram for the names of the variable and method. This should be the sequence of the program upon execution: a. Ask the user to input the name of the employee. b. Prompt the user to select between full time and part time by pressing either F (full time) or P (part time). If F is pressed, ask the user to type his monthly salary. Then, display his name and monthly salary. с. If P is pressed, ask the user to type his rate (pay) per hour and the number of hours he worked for the entire month separated by a space. Then, display his name and wage. Employee name: String + setName(): void + getName(): String FullTimeEmployee - monthlySalary: double + setMonthlySalary(): void + getMonthlySalary(): double PartTimeEmployee ratePerHour: double hoursWorked: int wage: double + setWage(): void + getWage(): double Note: You can add variables and methods if needed. Just make sure that all the variables and methods in the diagram are properly used. Sample Output: Enter name: Veronica V Press F for Full Time or P for Part Time Velasquez of hours worked separated by space: Enter rate per hour and no. Sample: 107.50 13 108.95 72 Name: Veronica V. Velasquez Wage: 7844.40
Task Performance A Simple Payroll Program Objective: At the end of the activity, the students should be able to: Create a program that exhibits inheritance and polymorphism. Software Requirements: Latest version of NetBeans IDE Java Development Kit (JDK) 8 Procedure: 1. Create four (4) Java classes. Name them RunEmployee, Employee, FullTimeEmployee, PartTimeEmployee. The RunEmployee class shall contain the main method and will be used to execute the program. 2. Write a simple payroll program that will display employee's information. Refer to the UML Class Diagram for the names of the variable and method. This should be the sequence of the program upon execution: a. Ask the user to input the name of the employee. b. Prompt the user to select between full time and part time by pressing either F (full time) or P (part time). If F is pressed, ask the user to type his monthly salary. Then, display his name and monthly salary. с. If P is pressed, ask the user to type his rate (pay) per hour and the number of hours he worked for the entire month separated by a space. Then, display his name and wage. Employee name: String + setName(): void + getName(): String FullTimeEmployee - monthlySalary: double + setMonthlySalary(): void + getMonthlySalary(): double PartTimeEmployee ratePerHour: double hoursWorked: int wage: double + setWage(): void + getWage(): double Note: You can add variables and methods if needed. Just make sure that all the variables and methods in the diagram are properly used. Sample Output: Enter name: Veronica V Press F for Full Time or P for Part Time Velasquez of hours worked separated by space: Enter rate per hour and no. Sample: 107.50 13 108.95 72 Name: Veronica V. Velasquez Wage: 7844.40
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 2GZ
Related questions
Question
100%
method overloading
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
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT