1. A procedure in an application needs to store student data. The student first name, student last name, student GPA, and whether or not the student is registered all need to be stored. Write the appropriate Dim statements to declare the variables. Make sure to use appropriate naming conventions.
2. Write a statement to display an input dialog box that shows “Car Make:” as the prompt, “Car” in the title bar, and an empty input area. When the user closes the dialog box, the assignment statement assigns the function’s return value to the strCar variable.
hint: You need to write one line of code.
3. The following sample of code contains errors. Rewrite the incorrect statements to correct all errors.
An application needs to display the message “Please add water” when the amount of water has fallen below the safe limit. Rewrite the following If statement to correct all errors:
If intWaterLimit < intWaterAmount Then
lblWarning = "Please add water"
4. An application needs to display whether or not a student has been accepted to college. The program needs to display either “Accepted” or “Not Accepted”. A student must have an SAT score of 1750 or higher and a GPA of 3.3 or higher. Rewrite the following If statement to correct all errors:
If intSAT = 3.3 Then
lblMessage.Text = "Not Accepted"
lblMessage.Text = "Accepted"
5. An application allows the user to enter a salary amount. The application should then calculate and display the possible bonuses based on that salary, using bonus rates of 3-6% in increments of .5%.
A procedure in an application needs to store student data
- Technology: WriteUps-papers-Essays-Designs
- Code: SHC_WriteUp_100062