Question: Lab Exercise 3: Question a) Aim: To implement Nested try catch Block Declare the following Employee_ld - integer Days - integer Weekly wages [] -

Lab Exercise 3: Question a) Aim: To implement Nested try catch Block Declare the following Employee_ld - integer Days - integer Weekly wages [] - An double array for maximum 7 days initialize with common value Total, average - double Main Objective: To calculate the total wages and average wages of an employee and display the output in the following manner: Output: Employee Id: Employee Name: Total Wages: Average: Outside try Block is used to catch the employee id if it is entered by the user in string or as double number, Example: enter the Employee_ld as 'EMP2016727' and catch the respective error Code snippet to enter the Enter number of days(Days) as zero, catch the error while calculating the average salary 0 1 2 3 4 5 6 10 11 10 10 10 10 10 Total = 70 Num of days = 0 Avg = total / Num of days
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
