Visual Basic Assignment:
Please write these programs using Visual Basic.
- Problem #1: Make up a program that uses three if statements that are nested or compound. Use color and sizing and fonts.
- 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 an inputbox (like a prompt) 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. Note the MsgBox should come up for each day.
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 assignments. You should have a textbox
to take in the assignment number and a textbox to hold the assignment name that is returned. Invalid
entries should display a message.
Assignment Number |
Assignment Name |
1 |
Access Database |
2 |
SQL |
3 |
Pseudocode |
4 |
Flowchart |
5 |
JavaScript code |
6 |
Visual Basic Code |
7 |
HTML |
- Problem #4: Write a program to write a file with three or four fields on it (different from the set I used).
- Problem #5: Then write a program to read the file and display it on the screen.