a. Create an Employee class with two fi elds: iDNum and hourlyWage. Th e Employee constructor requires values for both fi elds. Upon construction, throw an ArgumentException if the hourlyWage is less...


a. Create an Employee class with two fi elds: iDNum and hourlyWage. Th e Employee constructor requires values for both fi elds. Upon construction, throw an ArgumentException if the hourlyWage is less than 6.00 or more than 50.00. Write a program that establishes, one at a time, at least three Employees with hourlyWages that are above, below, and within the allowed range. Immediately after each instantiation attempt, handle any thrown Exceptions by displaying an error message. Save the fi le as EmployeeExceptionDemo.cs . b. Using the Employee class created in 5a, write an application that creates an array of fi ve Employees. Prompt the user for values for each fi eld for each Employee. If the user enters improper or invalid data, handle any exceptions that are thrown by setting the Employee’s ID number to 999 and the Employee’s pay rate to the $6.00 minimum. At the end of the program, display all the entered, and possibly corrected, records. Save the fi le as EmployeeExceptionDemo2.cs.



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here