Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Class Definitions Create a stuacnt class which should have the following instance attributes: name and grades, and the following class attribute: dept. The the class
Class Definitions Create a stuacnt class which should have the following instance attributes: name and grades, and the following class attribute: dept. The the class should have a method called PrintGradestats which should print for a student, the exam with the maximum grade and the average of the all grades. Details are shown in the sample output. grades attribute of the class holds a list of objects for a student. A Grade class should have the following instance attributes: score and examName. Details of the Program With this program, the user should be able to choose among the following options: 1) Create a student 2) Add an exam score for a student 3) View exam report for a student Nake a choice: 1 In the 1st option, creating a new student involves only entering the name of the student, as shown below: Make a choice: 1 Enter a student name: Student is added. 1) Create a student 2) Add an exaln score for a student 3) View exam report for a student In the 2nd option, the user should be requested first to select a student. After a student is selected, the exam grade and exam grade should be requested from the user. The details of this step are provided in the following output: Make a choice: ? Students are listed below: 1. Select a student: 1 Enter the grade info below. Exan name: Midtoren 1 Score: 90 Nidtern 1 grade (90) is atded for In the 3rd option, the user should be requepted first to select a student. Then, the grade stats should be displayed for the selected student. See the beelow example output. Rake a choice: 3 Students are listed below: 1. Select a student: 1 Grade Stats for Enkan Nax grade was in Midtern 1 with a score of 90 Average grade is 90.6 In the 2nd and 3rd options, if there are no students, the program should provide an appropriate message as shown in the following output: 1) Create a student 2) Add an exam score for a student. 3) VIow exam report for a student Make a cholce: 2 No student has been added yet
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started