Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using Microsoft Visual Studio, I'm having some difficulties, I've posted the code I've already built but am getting some errors Salary Calculator Total Hours Hourly
Using Microsoft Visual Studio, I'm having some difficulties, I've posted the code I've already built but am getting some errors
Salary Calculator Total Hours Hourly Wage Weekly Salary Calculate Exit 1. Create a new windows form project named SalaryCalculator and save it in your computer. Add labels, text boxes, and buttons to the default form and set the properties of the form and its controls so they appear as shown above. Create an event handler for the Click event of the Calculate button. This event handler should get the hours from the user, use if else statement to determine hourly wage and calculate weekly salary based on the input hours and the following rules 2. 3. If the total hour is less than or equal to 40, then determine wage and calculate salary, otherwise, display "Error" in wage and salary text boxes. If total hour is between 0 and 20 hours, the hourly wage is $10.00. If total hour is between 21 and 30 hours, the hourly wage is $12.00. If total hour is between 31 and 40 hours, the hourly wage is $15.00. Display hourly wage and weekly salary in the ReadOnly result text boxes. You may use this code to display the wage and salary in a currency format. txtWage.Text String. Format (" [0:C2] ", wage) Create an event handler for the Click event of the Exit button that closes the form Test the application to be sure it works correctly. Salary Calculator Salary Calculator le Total Hours3 Total Hours 45 Hourly Wage $12.00 Hourly Wage Error Weekly Salary $360.00 Weekly Salary Error Calculate Exit Calculate Exit SalaryCalculator Microsoft Vissal Studio t- Quick Launch (Ctrl+0 File Edit VicwProject ild Debug Team Tools Test Analyze Window Hclp Sign in DebugAry CPU mlcs x Forml.cs IDesign Scllution Explarer btrnCalculate Clickiobijinct sender,EventArgs e USINR System.HndOMS Forms Search Salution Fxplcrer (Ctrl+ 1e 11 nanespace SalaryCalculator 12 13 Salutian SalaryCalulator (1 prject) public partial class Farnl:Form Properties public Forni() App.config al Fom 1.cS b Formt Designer.cs 16 TnitializeComponent ) Farm1resx pForm CProgram.c private void btrnCalculate Click(object sender, EventAres e) 21 decimal Totalhours-Convert.ToDecinal(txtHourlyWage.Text) WeeklySalry 5 HourlyHage 23 26 Scollution Explorer Team Explorer 28 Hourlykage 1 .8e; else if (TolalHours 21 && TolalHours 30) Hourlykaue 12.00; else if Totalhours >_ 31 && TotalhoursStep 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