Question: In this exercise, you modify one of the Course Information applications created in this chapters Apply lesson. Use Windows to make a copy of the

In this exercise, you modify one of the Course Information applications created in this chapters Apply lesson. Use Windows to make a copy of the Course Info Solution-Total Hours folder. Rename the copy Course Info Solution-GPA. Open the Course Info Solution.sln file contained in the Course Info Solution-GPA folder. Unlock the controls on the form. Then, add two labels to the form. Position both between the lblTotal and btnCalc controls. Change one of the new labels Text property to GPA:. Change the other new labels name to lblGpa. Lock the controls. Open the Code Editor window. In addition to displaying the total number of hours completed, the btnCalc_Click procedure should also display the students GPA. Grades of A, B, C, D, and F are worth 4 points, 3 points, 2 points, 1 point, and no points, respectively. Display the GPA with one decimal place. Modify the procedures code. Save the solution and then start and test the application.

In this exercise, you modify one of the Course Information applications created

code

Public Class frmMain Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click ' Display the total number of credit hours completed.

End Sub

Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub

Private Sub CoursesBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles CoursesBindingNavigatorSaveItem.Click Try Me.Validate() Me.CoursesBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.MyCoursesDataSet) MessageBox.Show("Changes saved.", "Course Information", MessageBoxButtons.OK, MessageBoxIcon.Information) Catch ex As Exception MessageBox.Show(ex.Message, "Course Information", MessageBoxButtons.OK, MessageBoxIcon.Information) End Try End Sub

Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'MyCoursesDataSet.Courses' table. You can move, or remove it, as needed. Me.CoursesTableAdapter.Fill(Me.MyCoursesDataSet.Courses)

End Sub End Class

Course Information ID Code Title HoursGrade Total hours comple Calculate Exit Course Information ID Code Title HoursGrade Total hours comple Calculate Exit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!