Home /
Expert Answers /
Computer Science /
based-on-the-class-diagram-below-create-python-classes-to-make-your-classes-more-useful-and-easy-pa493
(Solved):
Based on the class diagram below, create Python classes. To make your classes more useful and easy ...
Based on the class diagram below, create Python classes. To make your classes more useful and easy to use, feel free to add public qetters. setters. or other methods. Question 2: Write a main method that creates a list of Student objects with the following data.
Question 3: Implement the following global method, which builds a dictionary of items using a list of Student objects as a parameter. Each item's key and value are the student's name and the student's score object. def getStudentScoreList(students : list[Student ])> dict[str, StudentScore] Question 4: Implement the following global method to print all the student score objects in the dictionary. Note, simply using print() method to print the entire dictionary is not acceptable, for example, print(studentScores). Therefore, you must use a loop to iterate the dictionary to print each item one at time def printAll(scoreScores : dict[str, StudentScore] ) -> None Question 5: Write the following global method that takes a list of Student objects and write all items to a Text file. Each field is separated by a tab It. def saveFile( students : list[Student], fileName : str ) -> None Here is a sample of the file.
Question 6: Create the following global method, which accepts a list of Student objects and creates a list of bad students with two or more zeros on their assignment from any of their courses. For instance, Nancy has two zeros in \( \operatorname{CS} 360 \) and Jim has two zeros in \( \operatorname{CS} 350 \). def getProblemStudents( students : list[Student], fileName : str ) -> list[Student]
Please go through the soultion and feel free to comment for any further help. There were a few ambigious instructions and I had to assume a few things. For any changes, feel free to comment. PLEASE COMMENT BEFORE DISLIKE. If helped a like is much app