Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a vb.net assignment. We are using visual studio 2019. App Design: 1. Make a windows application in Visual Studio and name it as

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

This is a vb.net assignment. We are using visual studio 2019.

App Design: 1. Make a windows application in Visual Studio and name it as A2FirstnameLastname. 2. Design and implement a Windows Form application that keeps track of the employees in a company and their earnings information. The application calculates an employee's wages and allow users to review employee information of any previously added employee. NOTE: At no point should the application save any information to disk. All information is stored and managed in memory using a collection. The use of collections and the object-oriented design of the solution are an important part of the evaluation of your submission 3. Design a form that looks something like the one below. Feel free to change the layout and colors: Wage Calculator Select type of employee Radio buttons Houty Paid Commission Based Weekly Salary nout the ecloyee's information Text boxes Calculate Name Hours Worked: Hourly Wage Clear Buttons Close Calculated wage Gross Eaming Readonly text boxes Less Tax Net Earmings Employees Combo box styled as DropDownList Fig. 1: Form layout 4. Ensure all names follow the naming conventions used in class. 5. Ensure the form is displayed centered on the screen. 6. Ensure the tab order of all controls is set correctly. Instructions: 1. User selects a type of employee from the radio buttons. . You can set one of the radio buttons as default selected. 2. On selecting "Commission Based" radio button, the labels "Hours Worked" and "Hourly Wage" should change to "Gross Sales" and "Commission Rate", respectively. (See screenshots at the end of this document). 3. On selecting "Weekly Salary" radio button, the label "Hours Worked" should change to "Weekly Salary", and "Hourly Wage" label and text box should hide. 4. Then, the user can enter the name of an employee, and the earning details. 5. Upon clicking the "Calculate" button, the application shall calculate and display the gross earnings, taxes and net earnings. Assume a federal tax of 20%. An hourly based employee is paid overtime wages which are calculated as 1.5 times the hourly wage for any hours over 40 hours a week. A commission-based employee is paid the commission based on the gross sales and commission rate. A weekly salaried employee just earns the weekly salary. 6. After doing the above calculations, add the employee names to the combo-box. The combo-box shall ONLY display the employee name and no other information. The employee names should be unique. Style the combo-box as DropDownList. 7. The application shall keep track of the employees using the most appropriate generic collection. 8. Upon selecting an existing employee, display the wage information associated with it including earnings. The radio button should be updated according to the type of employee. The name and the following two text boxes should display the appropriate data. The gross earning, tax and net earning should be displayed in the readonly text boxes. 9. The "Clear" button should clear all the fields of the form with the exception of the Employee combo- box. 10. The "Close" button should close the form. Classes: 1. Create an enum to handle the "type of employee". 2. Create an abstract class Employee. a. This class stores employee name and employee type. b. An abstract readonly property GrossEarnings. This property is implemented in each derived class to calculate the earnings of each type of employee. (readonly means property having only get accessor. This does not mean using the readonly keyword) C. A readonly property Tax, that calculates and returns the 20% tax. d. A readonly property NetEarnings that returns the net earnings after tax deductions, e. In addition to these, you can also create virtual properties HoursWorked, HourlyWage, GrossSales, Commissionate and WeeklySalary, and override them in the respective derived classes. 3. Inherit the class Hourly Employee from Employee. a. This class stores hours worked and hourly wage. b. Implements the GrossEarnings property that returns the earnings of this employee, considering any overtime at the rate of 1.5. 4. Inherit the class Commission Employee from Employee. a. This class stores the gross sales and commission rate. b. Implements the GrossEarnings property that returns the earnings of this employee. 5. Inherit the class SalariedEmployee from Employee. C. This class stores the weekly salary. d. Implements the GrossEarnings property that returns the earnings of this employee. 6. On the "Calculate" button's click event, after figuring out which type of employee it is, call the GrossEarnings property polymorphically, Exception Handling: 1. There should be no unhandled exceptions of any kind at run-time. 2. Display all errors resulting from the input validation using MessageBoxes. Validate the input as follows: a. All fields are required (radio buttons, name, hours worked and hourly wage). b. The name of the employee should be unique. C. The hours worked has to be a positive real number and cannot exceed 80. d. The hourly wage, gross sales, commission rate and weekly salary fields have to be a positive real number 3. The error messages should be clear and understandable. a. Something like, "Name field can not be left blank". b. Not like "Invalid input", or "Input was not in a correct format". Screenshots: LH Wage Calculator LA Wage Calculator Select type of employee Houty Paid Select type of employee Houty Paid Commision Based Woekly Salary Commission Based Weakly Salary Input the eployee'stomation Input the eployees Calculate Calculate Name Houn Worked Hourly Wage: Haun World Hout Wage Calculated wape Caldwage Grous Eatinge Goue a s 1600.00 Lese Tak: 5120.00 3480.00 Not Eanos: Net Earings Employees Fig. 2: Initial form load. Fig. 3: Calculations for hourly paid employee. I Wage Calculator I Wage Calculator Select type of employee Select type of employee O Houty Paid Commission Based Weekly Salary O Houty Paid Commission Based Weily Siery Case input the oployee's infomation Name Anna Gross Sales: 20000 Commission Rate: 5 put the eployees information Name Mark Weedy Salary: 300 Calculated wage Gross Eamings: 51.000.00 Calculated wage Goes Eamingo: 5800.00 5160.00 Less Tax $200.00 Les Tax Net Eamings $800.00 Net Eaminos 5640.00 Employees Employees Fig. 4: Calculations for commission based employee. The labels "Hours Worked" and "Hourly Rate" got changed to "Gross Sales" and "Commission Rate". Fig. 5: Calculations for salaried employee. The commission rate label and text box is hidden. App Design: 1. Make a windows application in Visual Studio and name it as A2FirstnameLastname. 2. Design and implement a Windows Form application that keeps track of the employees in a company and their earnings information. The application calculates an employee's wages and allow users to review employee information of any previously added employee. NOTE: At no point should the application save any information to disk. All information is stored and managed in memory using a collection. The use of collections and the object-oriented design of the solution are an important part of the evaluation of your submission 3. Design a form that looks something like the one below. Feel free to change the layout and colors: Wage Calculator Select type of employee Radio buttons Houty Paid Commission Based Weekly Salary nout the ecloyee's information Text boxes Calculate Name Hours Worked: Hourly Wage Clear Buttons Close Calculated wage Gross Eaming Readonly text boxes Less Tax Net Earmings Employees Combo box styled as DropDownList Fig. 1: Form layout 4. Ensure all names follow the naming conventions used in class. 5. Ensure the form is displayed centered on the screen. 6. Ensure the tab order of all controls is set correctly. Instructions: 1. User selects a type of employee from the radio buttons. . You can set one of the radio buttons as default selected. 2. On selecting "Commission Based" radio button, the labels "Hours Worked" and "Hourly Wage" should change to "Gross Sales" and "Commission Rate", respectively. (See screenshots at the end of this document). 3. On selecting "Weekly Salary" radio button, the label "Hours Worked" should change to "Weekly Salary", and "Hourly Wage" label and text box should hide. 4. Then, the user can enter the name of an employee, and the earning details. 5. Upon clicking the "Calculate" button, the application shall calculate and display the gross earnings, taxes and net earnings. Assume a federal tax of 20%. An hourly based employee is paid overtime wages which are calculated as 1.5 times the hourly wage for any hours over 40 hours a week. A commission-based employee is paid the commission based on the gross sales and commission rate. A weekly salaried employee just earns the weekly salary. 6. After doing the above calculations, add the employee names to the combo-box. The combo-box shall ONLY display the employee name and no other information. The employee names should be unique. Style the combo-box as DropDownList. 7. The application shall keep track of the employees using the most appropriate generic collection. 8. Upon selecting an existing employee, display the wage information associated with it including earnings. The radio button should be updated according to the type of employee. The name and the following two text boxes should display the appropriate data. The gross earning, tax and net earning should be displayed in the readonly text boxes. 9. The "Clear" button should clear all the fields of the form with the exception of the Employee combo- box. 10. The "Close" button should close the form. Classes: 1. Create an enum to handle the "type of employee". 2. Create an abstract class Employee. a. This class stores employee name and employee type. b. An abstract readonly property GrossEarnings. This property is implemented in each derived class to calculate the earnings of each type of employee. (readonly means property having only get accessor. This does not mean using the readonly keyword) C. A readonly property Tax, that calculates and returns the 20% tax. d. A readonly property NetEarnings that returns the net earnings after tax deductions, e. In addition to these, you can also create virtual properties HoursWorked, HourlyWage, GrossSales, Commissionate and WeeklySalary, and override them in the respective derived classes. 3. Inherit the class Hourly Employee from Employee. a. This class stores hours worked and hourly wage. b. Implements the GrossEarnings property that returns the earnings of this employee, considering any overtime at the rate of 1.5. 4. Inherit the class Commission Employee from Employee. a. This class stores the gross sales and commission rate. b. Implements the GrossEarnings property that returns the earnings of this employee. 5. Inherit the class SalariedEmployee from Employee. C. This class stores the weekly salary. d. Implements the GrossEarnings property that returns the earnings of this employee. 6. On the "Calculate" button's click event, after figuring out which type of employee it is, call the GrossEarnings property polymorphically, Exception Handling: 1. There should be no unhandled exceptions of any kind at run-time. 2. Display all errors resulting from the input validation using MessageBoxes. Validate the input as follows: a. All fields are required (radio buttons, name, hours worked and hourly wage). b. The name of the employee should be unique. C. The hours worked has to be a positive real number and cannot exceed 80. d. The hourly wage, gross sales, commission rate and weekly salary fields have to be a positive real number 3. The error messages should be clear and understandable. a. Something like, "Name field can not be left blank". b. Not like "Invalid input", or "Input was not in a correct format". Screenshots: LH Wage Calculator LA Wage Calculator Select type of employee Houty Paid Select type of employee Houty Paid Commision Based Woekly Salary Commission Based Weakly Salary Input the eployee'stomation Input the eployees Calculate Calculate Name Houn Worked Hourly Wage: Haun World Hout Wage Calculated wape Caldwage Grous Eatinge Goue a s 1600.00 Lese Tak: 5120.00 3480.00 Not Eanos: Net Earings Employees Fig. 2: Initial form load. Fig. 3: Calculations for hourly paid employee. I Wage Calculator I Wage Calculator Select type of employee Select type of employee O Houty Paid Commission Based Weekly Salary O Houty Paid Commission Based Weily Siery Case input the oployee's infomation Name Anna Gross Sales: 20000 Commission Rate: 5 put the eployees information Name Mark Weedy Salary: 300 Calculated wage Gross Eamings: 51.000.00 Calculated wage Goes Eamingo: 5800.00 5160.00 Less Tax $200.00 Les Tax Net Eamings $800.00 Net Eaminos 5640.00 Employees Employees Fig. 4: Calculations for commission based employee. The labels "Hours Worked" and "Hourly Rate" got changed to "Gross Sales" and "Commission Rate". Fig. 5: Calculations for salaried employee. The commission rate label and text box is hidden

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Conduct an effective performance feedback session. page 360

Answered: 1 week ago