Presentation is loading. Please wait.

Presentation is loading. Please wait.

Design the form above that calculates GPAs. It has a ComboBox of grades, a NumericUpDown control for credits, a button to add grades and credits to two.

Similar presentations


Presentation on theme: "Design the form above that calculates GPAs. It has a ComboBox of grades, a NumericUpDown control for credits, a button to add grades and credits to two."— Presentation transcript:

1 Design the form above that calculates GPAs. It has a ComboBox of grades, a NumericUpDown control for credits, a button to add grades and credits to two separate ListBoxes. You cannot add unless a grade is selected. The Calculate button is enabled when a grade is entered into the lists.

2 When the Calculate button is clicked, the GPA is calculated by summing the products of the weight for a grade () by the number of credits for the course and then dividing by the sum of the credits. If a new grade/credit combination is added to the list, then the GPA label is cleared.

3 Grade Weights A4 A-3.667 B+3.333 B3 B-2.667 C+2.333 C2 C-1.667 D+1.333 D1 F0 B+ (3 credits) and A- (4 credits) (3.333 * 3 + 3.667 * 4)/(3 + 4) (9.999 + 14.668)/7 24.667/7 3.5238571428571428571428571428571

4 For now grade weights can be handled using a Select Case statement Select Case Grade Case "A" GradeWeight = 4 Case "A-" GradeWeight = 3.667 … End Select

5 When the Clear button is clicked, the lists should be cleared (the ListBoxes have an Items property and the Items property has a Clear method) and the Calculate button should be disabled.


Download ppt "Design the form above that calculates GPAs. It has a ComboBox of grades, a NumericUpDown control for credits, a button to add grades and credits to two."

Similar presentations


Ads by Google