Question: In this problem, you will build a grade calculator GUI application. This application uses many elements in tkinter including Frames, Labels, Entry, and Buttons. This

In this problem, you will build a grade calculator GUI application. This application uses many elements in tkinter including Frames, Labels, Entry, and Buttons.
This GUI application will accept three values from the user:
The average grade of all the tests taken.
The average grade of all the labs completed.
The average grade of all the exams taken.
When the user hits the Calculate button, the program will calculate the overall average of the grades using the following weighting:
Table 1: Grade Weighting for Activities in application.
Activity Weighting
Tests 20%
Labs 30%
Exams 50%
When the user hits the Quit button, the program will exit.
Here is what the application should roughly look like when it starts:
Here is a written version of the above graphic.
The application has a title bar with the title "Grade Calculator".
The first line has a Tests Grade label followed by a blank text field.
The second line has a Labs Grade label followed by a blank text field.
The third line has a Exams Grade label followed by a blank text field.
The fourth line has a Grade Average label followed by another label with dashes.
The fifth line has two buttons: A Calculate button and a Quit button.
Here is what the application looks like after the user performs a Calculate operation:
Here is a written version of the above graphic:
The Tests Grade text field has 85.3 filled in.
The Labs Grade text field has 92 filled in.
The Exams Grade text field has 78 filled in.
The field after Grade Average shows 83.7 followed by B in parenthesis.
Note that this application should gracefully catch errors in the user's input (like entering a number that cannot be converted to a float) and provide some kind of feedback. This feedback could be done by changing the label after Grade Average to "Error" or the application could pop-up an error dialog. Either is acceptable for this implementation.
This application has two features not mentioned in the textbook:
This application has a custom title, "Grade Calculator" in the application title bar. To get this custom title, you use the title method of the main window:
self.main_window.title('Grade Calculator')
This application starts with a custom size of width 260 by height 125. To get this custom size, you use the geometry method of the main window:
self.main_window.geometry('260x125')
Create a file named Lab14P1.py and implement your GUI application in that file. Review the textbook for details on how to create each element and how to support the updates of the grade average label using a callback function. The textbook also provides details for creating a quit button using the destroy method.
For this problem you are REQUIRED to implement this solution using the class-based approach shown in the textbook and described in the video lectures. Solutions that are submitted using a function-based approach will be lose 50% credit for their implementation.
In this problem, you will build a grade

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 Programming Questions!