Need Help with this Question or something similar to this? We got you! Just fill out the order form (follow the link below), and your paper will be assigned to an expert to help you ASAP.
Write a program that records and displays weekly payroll of a department that hires both salaried (work 40 hours/week) and hourly employees. The program should accept user input and display total number of employees, numbers of salaried and hourly employees, total weekly payroll, etc. See the detailed requirements below. In addition, the program should display individual employee records which user enters. A sample user interface is shown in Figure-1 and Figure-2. You are welcome to design a different interface as long as the program implements all required functions and meets the grading criteria as follows.
Figure-1 Hourly Employee is selected
Figure-2 Salary Employee is selected
1.) Data input interface: when an hourly employee is selected in the “Type” (radio button), the “Hourly Rate” label and textbox and the “Hours” label and textbox display for data input (see Figure-1). When the Salaried is selected, the “Hourly Rate” turns to the “Annual Salary” and the “Hours” label and textbox are hidden (see Figure-2). (2 points)
2.) You will design and implement a base class Employee and two child classes: HourlyEmployee and SalariedEmployee. HourlyEmployee and SalariedEmployee should inherit their base class Employee. You are encouraged to user abstract class for Employee (this is the best design!), but it is still fine without using abstract class for Employee. But the object-oriented system design rules MUST be followed. That is, the base class Employee doesn’t have any members that are specific to a child class, for example, Employee shouldn’t have a property of hourly rate (which is only available for HourlyEmployee), or annual salary (which is only available for SalariedEmployee). Accordingly, you need to add more members (properties and/or methods) as needed in each child class of Employee. (3 points)
• Employee class is worth 1 point.
• SalariedEmployee earns annual salary and the method of WeeklyGrossPay() is annual salary divided by 52 (weeks). This class is worth 1 point.
• HourlyEmployee earns wage which is calculated by (number of hours x hourly rate). Accordingly, WeeklyGrossPay() is total work hours per week timed by hourly rate. This class is worth 1 point.
• One point is deducted if not following the object-oriented system design rules.
3.) The program uses a collection object such as List to store all user-entered payroll records. When user enters a new payroll and clicks the “Record Employee” button, the program adds the record to the collection object and displays it with all existing records in a ListView as shown in Figure 1 or 2. Each record is displayed with name, employee type, pay rate, and work hours (only for hourly employee). For the salaried employee, the “Hours” field is blank. After a new record is added successfully, all data input fields should be cleared out to prevent the user from adding duplicated records in the List. (3 points)
Note: In the screenshots above (Figures 1 & 2), I used a DataGridView to display employee records. DataGridView wraps up the text in the column heading if the column width cannot display the text in one line. ListView doesn’t wrap up the text – if the text is too long to fit in one column, it is cut off. We’ll use DataGridView in the following classes (e.g., data access layer Programming).
4.) When user clicks the button “Display Payroll”, the following summary information displays in a ListBox as shown in Figure 1 or 2. (4 points)
• Total number of employees
• Number of salaried employees
• Number of hourly employees
• Total salaried employee weekly payroll
• Total hourly employee weekly payroll
• Total weekly payroll
5.) Data validation must be conducted for all data input TextBoxes to prevent program from crashing due to invalid data entry. All data entry fields are required. If a data field receives an invalid data (e.g., non-numeric) or empty, it is highlighted with a warning message popping up. A radio button for employee type must be checked before a valid employee record is created and displayed. Use a GroupBox container to group more than one radio buttons so that only one radio button is selected. (2 points)
6.) Use correct coding conventions/practices. Please follow the instructions in https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions. Specifically, you are required to use meaningful and self-descriptive names for any programming elements (e.g., variable, class, object) and add brief comment for method, class, and lines of code which you think need to be explained. (1 point)
Note: If you use a ListView, the heading text can only display in one row. If the width of the column of ListView is too short to display the entire heading text, the heading is cut-off. This is okay in this assignment.