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:
Write a program that is similar to #1 but this time I want a loop where we can test 4 people. So
have a button that you can click to do a loop. Take in the hours worked, the pay per hour and the amount they
want to withhold using InputBox. Display the same messages that you did in number one but display them using
the message for each user using a MessageBox. I would suggest using a wkCt field to keep track of the people
as you test them and to control the loop.
- Problem #3:
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 #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.
- Problem #5: Write a program to write a file with three or four fields on it. Then write a program to read the file
and display it on the screen.
- Problem #6: Debug this program and clean up any style issues like things not names correctly etc.