Visual Basic Assignment:

 

Your first four problems are to write the algorithm assignment problems using Visual Basic.

 

Problem #1:  Take in the high temperature for a day and the low temperature for a day. Display the average temperature for the day.

 

Problem #2:  You need to take in the price of four items a customer bought, determine the total price before tax, determine the tax using the tax rate of 2.5% and then determine the total price after taxes.  The output should show the total price before tax, the tax and the total price after taxes..

 

Problem #3:  You have received 5 numeric grades for the semester.  Grades can range from 0 to 100.  The first grade counts for 10% of you final grade.  The second grade counts for 15% of your final grade. The third grade counts for 25% of your final grade. The fourth grade counts for 20% of your final grade. The fifth grade counts for 30% of your final grade.  Calculate and display your final numeric grade.

 

Problem #4: You need to calculate an employees pay.  To do this you will need:

·        the number of hours the employee worked

·        the number of hours the employee is contracted to work before the employee receives overtime (for example, the employee might be contracted to work 40 hours and only receives overtime for hours over 40)

·        the pay per hour

·        the rule for calculating over time (time and one half would be 1.5 while double time would be 2).

Test this problem with information about an employee who did not work over their contracted hours and again for an employee who did work over their contracted hours.

Problem #5: Visual Basic Arrays

Set up the following array for vacation resorts:

Resort No

Resort Name

1

Lake View

2

Laurel Ridge

3

Mountain View

4

Running Creek

5

Rocky Ridge

 

Have a textbox to take in the resort number and display the resort name on the screen.

 

Problem #6  Write a VB 6 program that will create a file from information entered on the form.

 

Problem #7: Write a second VB 6 program that will read the file you created and display the information on a form. Use my sample programs under read and write and PowerPoint presentation to model this.