Instruction: Create a program to compute the gross pay of a certain employee. Ensure that all exceptions will be handled/declared correctly. Allow the user to input the following details: Name, nature of work, position and number of hours worked. The nature of work is either field or office. For field work, the employee will get an allowance of 1000. Position of employee is either manager, supervisor or employee. Manager has a rate of 1000, supervisor has a rate of 700 and employee has a rate of 300.See sample input and output below: Name: Juan Dela Cruz Nature of Work: 1 [1) Field //additional allowance of 1000 [2] Office Position: M (M) Manager //1000 (S) Supervisor //700 (E] Employee //300 Number of Hours Work: 10

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...
icon
Related questions
Question

Java program employee 

Activity/Experiment No. 4
Title of the Activity/Experiment: Exception Handling
Objectives of the Activity/Experiment:
Students should be able to:
• To let the students create codes that demonstrate the use of
Exception Handling in a Java application.
Target CILO:
CILO2 - Construct programs using OOP concepts like
abstraction, encapsulation, inheritance, polymorphism and
advanced class features.
Recommended Equipment:
• Laptop or Desktop with internet connection
Instruction:
Create a program to compute the gross pay of a certain
employee. Ensure that all exceptions will be handled/declared
correctly. Allow the user to input the following details: Name,
nature of work, position and number of hours worked. The nature
of work is either field or office. For field work, the employee will
get an allowance of 1000. Position of employee is either manager,
supervisor or employee. Manager has a rate of 1000, supervisor
has a rate of 700 and employee has a rate of 300.See sample
input and output below:
Name: Juan Dela Cruz
Nature of Work: 1
[1) Field lladditional allowance of 1000
[2] Office
Position: M
(M] Manager //1000
(S) Supervisor //700
(E] Employee l/300
Number of Hours Work: 10
Transcribed Image Text:Activity/Experiment No. 4 Title of the Activity/Experiment: Exception Handling Objectives of the Activity/Experiment: Students should be able to: • To let the students create codes that demonstrate the use of Exception Handling in a Java application. Target CILO: CILO2 - Construct programs using OOP concepts like abstraction, encapsulation, inheritance, polymorphism and advanced class features. Recommended Equipment: • Laptop or Desktop with internet connection Instruction: Create a program to compute the gross pay of a certain employee. Ensure that all exceptions will be handled/declared correctly. Allow the user to input the following details: Name, nature of work, position and number of hours worked. The nature of work is either field or office. For field work, the employee will get an allowance of 1000. Position of employee is either manager, supervisor or employee. Manager has a rate of 1000, supervisor has a rate of 700 and employee has a rate of 300.See sample input and output below: Name: Juan Dela Cruz Nature of Work: 1 [1) Field lladditional allowance of 1000 [2] Office Position: M (M] Manager //1000 (S) Supervisor //700 (E] Employee l/300 Number of Hours Work: 10
OUTPUT:
Name: Juan Dela Cruz
Nature of Work: Field
Allowance: 1000
Position: Manager
Rate: 1000
Hours Worked: 10
Gross: 11000
Use the computation below to compute the gross pay of the
employee.
Create a separate class for the following:
• Manager
• Supervisor
• Employee
• TestCompute
Gross pay = Rate*Hours Worked + Allowance
Emplovee
- name: String
- rate: int
+ showDetails():String
+ setters()
Manager
Supervisor
• What to submit?
o JAR
file
(LE4_LastnameStudent1_LastnameStudent2_Lastna
meStudent3)
o Screenshot of the command prompt showing the
running jar file (filename: LE4_cmd)
o All java files
Transcribed Image Text:OUTPUT: Name: Juan Dela Cruz Nature of Work: Field Allowance: 1000 Position: Manager Rate: 1000 Hours Worked: 10 Gross: 11000 Use the computation below to compute the gross pay of the employee. Create a separate class for the following: • Manager • Supervisor • Employee • TestCompute Gross pay = Rate*Hours Worked + Allowance Emplovee - name: String - rate: int + showDetails():String + setters() Manager Supervisor • What to submit? o JAR file (LE4_LastnameStudent1_LastnameStudent2_Lastna meStudent3) o Screenshot of the command prompt showing the running jar file (filename: LE4_cmd) o All java files
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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 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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY