Fixed GPA—No Listeners
Rewrite the program of Exercise 4 using input dialog boxes. Each box should provide a drop-down list of grades. You do not need to implement any listeners.
Exercise 4
Fixed GPA Calculation—One Listener
Write a program that calculates the grade point average (GPA) of up to fi ve letter grades, each of which can be A, B, C, D, or F. Use fi ve separate text fi elds for grade input, and a label for output. Your program does not need to respond to events generated by a text fi eld. Instead, include a button labeled Calculate along with a listener class that responds to a button event. Handle erroneous data with an appropriate message. When calculating the GPA, a value of 4 is assigned to A, 3 to B, 2 to C, and so on.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here