Computers and Technology

In this exercise, you modify the History Grade application from this chapter’s Focus lesson. Use Windows to make a copy of the History Solution folder. Rename the copy History Solution-Functions. Open the History Solution. sln file contained in the History Solution-Functions folder. Modify the btnDisplay_Click procedure so that it uses two functions named GetGrade101 and GetGrade201 to get the appropriate grade; the procedure should then display the grade in the lblGrade control. Change the two independent Sub procedures to functions that return the appropriate grade to the statements that invoke them in the btnDisplay_Click procedure. Each function should contain a parameter that accepts the total points passed to it. Save the solution and then start and test the application. Option Explicit On
Option Strict On
Option Infer Off
Public Class frmMain
' Independent Sub procedures.
Private Sub btnDisplay_Click(sender As Object, e As EventArgs) Handles btnDisplay. Click
' Calls independent Sub procedures to display a grade.
End Sub
Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit. Click
Me. Close()
End Sub
Private Sub txtPoints_Enter(sender As Object, e As EventArgs) Handles txtPoints. Enter
txtPoints. SelectAll()
End Sub
Private Sub ClearGrade(sender As Object, e As EventArgs) Handles txtPoints. TextChanged, radHis101.CheckedChanged, radHis201.CheckedChanged
lblGrade. Text = String. Empty
End Sub
Private Sub txtPoints_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtPoints. KeyPress
' Accept only numbers and the Backspace key
If (e. KeyChar < "0" OrElse e. KeyChar > "9") AndAlso e. KeyChar <> ControlChars. Back Then
e. Handled = True
End If
End Sub

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:00, Wolfie215
Which of the following is a way that advancements in technology improve humans' ability to measure air quality and protect human health? a. air quality data gathered by new instruments can be used to reduce exposure to pollutants. b. new technologies enable natural and human-made pollution sources to be located and monitored. c. air quality data gathered by new instruments can be used to predict trends in pollution over time. d. new technologies allow governments to make informed decisions about the regulation of pollution. (choose more than one)
Answers: 2
image
Computers and Technology, 22.06.2019 22:50, youngboymark123
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
image
Computers and Technology, 23.06.2019 04:20, RandomLollipop
Which network media uses different regions of the electromagnetic spectrum to transmit signals through air? uses different regions of the electromagnetic spectrum to transmit signals through air.
Answers: 2
image
Computers and Technology, 23.06.2019 12:30, Prettygirlyaya
How is the brightness of oled of the diaplay is controled
Answers: 1
Do you know the correct answer?
In this exercise, you modify the History Grade application from this chapter’s Focus lesson. Use W...

Questions in other subjects:

Konu
Mathematics, 22.06.2019 16:30