Question: Need help with step 9. This involves visual basic studio 2012 Create a new Windows Form Application TimeEntry. Design and define the GUI similar to
Need help with step 9. This involves visual basic studio 2012
Create a new Windows Form Application "TimeEntry". Design and define the GUI similar to the following form, user will enter time (hours) in the textbox, suppose user always input valid integer hours. Set "Submit time" button as the default button for the form, this button will be pressed when the user presses the Enter key. (Review slide #18 of lecture notes to learn how to set default button for a windows form). Add a ListBox to record and display the time entries for 5 days, after user enter hours for each day, it will be shown in the ListBox immediately. The "Get payment" button is disabled when program starts to run (Set this button's Enabled property to False in its properties window). After user enters hours for 5 days, the TextBox and "Submit time" button are disabled: the "Get payment" button is enabled. Create and define 3 event handler methods to handle the button_click events for 3 buttons. When click "Submit time" button ------- If the TextBox is not empty and user entered less than 5 time entries, the hours entered in the TextBox will be read and added in the ListBox. If user has already entered 5 time entries, then disable the "Submit time" button and input TextBox, enable "Get Payment" button. Here is the template of event handler method "SubmitButton_Click", please follow the comments to complete the code: When click "Get payment" button ------ Use a counter controlled repetition statement to read time entries repeatedly from ListBox for calculation. Calculate the total hours Calculate user's payment following the rules below If the total hours is less than or equal to 40, then calculate payments, otherwise, display an error message to the user. If total hours is between 0 and 20 hours, the hourly wage is $10.00 If total hours is between 21 and 30 hours, the hourly wage is $12.00 If total hours is between 31 and 40 hours, the hourly wage is $15.00 Display user's payment as the Text property of the result Label. You may use this code to display the payment in a currency When click "Clear time" button ------ The TextBox, ListBox and result label will be cleared The form should be converted to the initial status
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
