Visual Basic Assignment:
Please write these programs using Visual Basic.
- Problem #1:
Write a program using Visual Basic that will let the user key in to textboxes the hours worked,
the pay per hour and the amount they want to withhold. Have the computer then calculate the pay
and display it in a textbox. I also want you to have a text box to hold a message. Display a message that says
I need a raise if the calculated pay is under 1000 and display a message saying OK if the
calculated pay is not under 1000. I want to see some color and some bold, italics or a change of
font on the form.
- Problem #2:
You have a product that is on sale. Each day of the sale, the price drops 10% from its previous price.
The sale lasts for 4 days. You should write a program that processes this problem using a loop. You want
to have a text box for the original price. You want to put up a MsgBox giving the price of each
day of the sale. Use a loop and each pass through the loop should generate the sale price for a a day of
the sale and that is what you should display using a MsgBox.
Remember the syntax for a message box is MsgBox(put what you want to display in here).
- Problem #3: Set up the following array for places you want to visit. You should have a textbox
to take in the trip number and a textbox to hold the destination that is returned. Invalid
entries should display a message.
Trip Number |
Destination |
1 |
London |
2 |
Paris |
3 |
Lisbon |
4 |
Sydney |
5 |
Baku |
6 |
Pretoria |
7 |
Buenos Aires |
8 |
Toyoko |
- Problem #4: Write a program that creates a file. The file should have three or four fields.
- Problem #5: Write a program that reads the file you created and displays the information.