Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Lab Assignments

Control Structure

In this lab assignment, you will create a "TimeEntry" windows form application, user will input work hours for each day in a week (5 days) repeatedly, the program will record the user's time entries, calculate the payment and display on the form. Please follow the following steps to complete this assignment.

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.

Add a ListBox to record and display the time entries for 5 days, after user enter hours for one day, it will be shown in the ListBox immediately.

The "Get payment" button is disabled when program starts to run.

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 hours TextBox, enable "Get Payment" button.

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 format.

PayLabel.Text = String.Format("{0:C2}", Payment)

When click "Clear time" button ----

The TextBox, ListBox and result label will be cleared
The form should be converted to the initial format.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92025118
  • Price:- $35

Priced at Now at $35, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Assignmentanalyze web programs in order to test debug and

Assignment Analyze web programs in order to test, debug, and improve them. Provide your own original example for each of the explanations you provide. Explain how geologation can determine your location. Discuss the accu ...

Suppose that you have a singly-linked list l containing the

Suppose that you have a singly-linked list L containing the sequence of numbers (1,2,3,4,5,6,7,8,9). Suppose further that you have an initially empty stack S. i) Give a pseudo-code description of a method that uses only ...

A manager has a 250 million portfolio that consists of 40

A manager has a $250 million portfolio that consists of 40% stock and 60% bonds. The beta of the stock position is 1.4. The modified duration of the bond position is 5. The manager wishes to achieve an effective mix of 7 ...

Question 1two variables have a negative non-linear

Question 1 Two variables have a negative non-linear correlation. Does the dependent variable increase or decrease as the independent variable increases? A)Dependent variable would remain the same B)Dependent variable inc ...

Need a use case diagram for a case studythe case studypaul

Need a use case diagram for a case study: The case study Paul is the Director of IT Services for a consulting firm Avant. The firm has been growing fast since it was launched in 2010. With over 100 employees and hundreds ...

Use the management studio to create a new database called

Use the Management Studio to create a new database called the default settings(If the database already exists, use the Management Studio to delete it and than create it.

What are information silos what are the problems caused by

What are information silos? What are the problems caused by information silos? How organizations can solve the problems caused by information silos?

Susans special sauces is a company that produces a variety

Susan's Special Sauces is a company that produces a variety of condiments, salad dressings and sauces. Susan, the company owner, wants to distribute her product overseas and recently purchased a building on the outskirts ...

Introduction to software developmentmenu-driven

Introduction to Software Development Menu-Driven Programs TASKS: Language translator. Design a program that display the following menu: Select a language and I will say Good Morning English Italian Spanish German End the ...

Design a moore machine where the output y goes high 1 when

Design a Moore machine where the output Y goes high (=1) when the last four bits of the input X were 1110: 4th to last bit seen = 1 3rd to last bit seen = 1 2nd to last bit seen = 1 Last bit seen = 0 Your machine must be ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As