Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please create a python module named homework.py and implement the classes and methods outlined below. Below you will find an explanation for each class and

Please create a python module named homework.py and implement the classes and methods outlined below. Below you will find an explanation for each class and method you need to implement. When you are done please upload the file homework.py to Grader Than. Please get started as soon as possible on this assignment. This assignment has many problems, it may take you longer than normal to complete this assignment.

This assignment is supposed to represent a group of students in a course. A group of students in a course will be assigned an assignment and produce a collection of assignment results. The results will be used to figure out grade statistics. The grade they receive for their work on the assignment is entirely dependant on the student's energy level. If the student works on many assignments without sleeping their grade will suffer. You will implement four classes (Assignment, AssignmentResult, Student, and Course), they will depend on each other in the order they are listed.

Hint: Work on the methods in the order they are found in the documentation below, implement the getter and setter methods before the more complicated methods. Work on the Assignment class, AssignmentResult class, Student class and Course class in that order.

Make sure you don't name your class variables the same name as you class's methods. In other words if you have method named id you cannot have a class variable named self.id. To avoid name conflicts often developers will start the name of their class variables with 2 underscores "_". For example self.__id = 123

Class Course

This class represents a course that a group of students is enrolled in. They will be assigned assignments when enrolled in this course. This object will be used to calculate aggregate student statistics.

__init__(self, students: list): """ Constructs a course with the specified list of students :param students: A list containing one or more students """
get_mean_grade(self) -> float: """ Returns the numerical value of the class mean (average) grade. :return: The average student grade """
get_max_grade(self) -> float: """ Returns the highest grade in the class. The grades used in the calculation come from the student.get_grade(), it does not care if a grade was earned when the student was in another class. :return: The highest grade in the class """
get_min_grade(self): """ Returns the lowest grade in the class. The grades used in the calculation come from the student.get_grade(), it does not care if a grade was earned when the student was in another class. :return: The lowest grade in the class """
get_median_grade(self) -> float: """ Calculates and returns the median (middle value) of all the student's grades in this course The grades used in the calculation come from the student.get_grade(), it does not care if a grade was earned when the student was in another class. :return: The median grade """
get_grade_variance(self) -> float: """ Calculates and returns the sample variance of all the student's grades in this course The grades used in the calculation come from the student.get_grade(), it does not care if a grade was earned when the student was in another class. :return: The sample variance of the grades """
get_grade_std_dev(self) -> float: """ Calculates and returns the sample standard deviation of all the student's grades in this course. The grades used in the calculation come from the student.get_grade(), it does not care if a grade was earned when the student was in another class. :return: The sample standard deviation of the grades """
assign(self, name: str, difficulty: float) -> None: """ This creates an assignment using the parameters specified, then assigns it to all of the students in this course, by calling the assign method on each student. Subsequent invocations to the statistics methods above should reflect the changes made by this method after it is called. In other words if a very difficult assignment is assigned the course mean should be less after. :param name: The name of the assignment :param difficulty: The level of difficulty of the assignment :return: None """

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What is electric dipole explain with example

Answered: 1 week ago

Question

What is polarization? Describe it with examples.

Answered: 1 week ago