Question: Write a python class that satisfies the following UML diagram and has a constructor that always assigns gradePoints to and empty dictionary {}, and allows

Write a python class that satisfies the following UML diagram and has a constructor that always assigns gradePoints to and empty dictionary {}, and allows setting of the name and major attribute via the parameter, use default values for params (your choice).

Write a python class that satisfies the following UML diagram and has

Function Breakdown: I

addGrade(...) takes a grade and a category, where the category specifies the list in the gradePoints dictionary to be added (if not in the dictionary - add a single element list)...

I getPer(...) given a grade weight dictionary compute the students percentage

I getGPA(...) return gpa such that 93 is 4. Otherwise: 4*(per-60)/33 I getLetter(...) returns the letter grade A-F

I str () function should return a string such as Name (Major)

___________________________________________________________________________

Write a class that satisfies the following UML diagram and has a constructor that always assigns gradeWeights to and empty dictionary {} and the students to an empty list [], and sets the allows setting of the name.

a constructor that always assigns gradePoints to and empty dictionary {}, and

Function Breakdown:

I addStudent(...) should add the specified student to the appropriate attribute

I setGradingWeight(...) sets the weight for the grade category (adding if not in dict)

I getCourseAvgPer() returns the average across all students if the grade weights do not add to 1 (100%) then print an error message instead, and return 0.

I getCourseAvgGPA() returns the average GPA across all students if the grade weights do not add to 1 (100%) then print an error message instead, and return 0.

I printStudents() iterates through the students and prints the student objects I str () function should return a string such as Name - # Students

Stuidenit gradePoints: dict name string major string + addGrade(grd:float, ctgry:string) + getPer(weighting:dict):float getGPA(weighting:dict):float +getLetter(weighting:dict): string +str() string

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