Question
C# Program 1. Create Employee class with two fields: idNum and hourlyWage. The Employee constructor requires values for both fields. Upon construction, thrown an ArgumentException
C# Program
1. Create Employee class with two fields: idNum and hourlyWage. The Employee constructor requires values for both fields. Upon construction, thrown an ArgumentException if the hourlyWage is less than 7.50 or more than 50.00. Write 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 file as EmployeeExceptionDemo.cs.
2. Application that creates an array of five Employees. Prompt the user for values for each field 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 $7.50. At the end of the program, display all the entered, and possible corrected, records.Save the file as EmployeeExceptionDemo2.cs.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started