Visual Basic Assignment:
Please write these programs using Visual Basic. I would prefer
that you use version 6 (it is available from MSDN). If you
want to work at home and it is not compatible, then you can
use version a later version.
- 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:
Write a program that contains a loop that you will do 5 times. Do a program like the math facts one I did
but do multiplication. Do it using a for loop.
- Problem #3: Redo problem #2 using a while or until do loop.
- Problem #4: 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 #5: Write a program that creates a file. The file should have three or four fields.
- Problem #6: Write a program that reads the file you created and displays the information.
Extra credit:
Revise the for… next program we looked at in class (ProjFor1.vbp and frmFor2.frm under programs)
to use three nested loops. You should be adding the first two numbers together and then multiplying
by the third number. (My example just adds the two numbers together).