Question: computer Python question. please help. Question 4: (15 marks) sec. add ( $2) sec. add (s3) Consider a simple school management system that consists of
computer Python question. please help.

Question 4: (15 marks) sec. add ( $2) sec. add (s3) Consider a simple school management system that consists of two classes. A Student class and a Section sec . displaySection () class. sec . updateScore (s1, 500) sec . displaySection () The Student class has the following attributes and behaviors: sec . averageScore () sec . remove ($3) sec. displaySection () Student sec . averageScore () name: string Output: id: string score: float New student "Mohamad" was added successfully! init_( ) : initialize the student's attributes. New student "Hoda" was added successfully! getStdName ( ) : returns the name of the student getStdid ( ) : returns the id of the student New student "Hassan" was added successfully! getStdScore ( ) : returns the score of the student. _str_( ) : displays all the student's information List of all students in section: Mohamad 600053 100 Hoda 700060 200 The Section class has the following attributes and behaviors: Hassan 800090 300 Mohamad has updated his score! Section List of all students in section: Mohamad 600053 500 Hoda 700060 200 course_name: string Hassan 800090 300 course_section: string std list: list Average of entire section: 333.33 init_( ) : initializes the Section's attributes. Removed Hassan from section list! add ( ) : adds a new student. Pass the student object as a parameter. remove () : removes a student from the list of the students. Pass the student object as a parameter List of all students in section: updateScore () : updates the score of a specific students. Pass the student object and the score. Mohamad 600053 500 displaySection () : displays all students' information in the section. Hoda 700060 200 averageScore () : calculates and displays the average score of the whole section. Average of the entire section: 350.00 Implement the two classes. Test your implementation by instantiating three objects of the Student class and one object of the Section class. For example, if you write the code below in the main section of the program and execute your code, you should get the below output: s1= Student ("Mohamad", "600053", 100) $2= Student ("Hoda" , "700060" , 200) s3= Student ( "Hassan", "800090", 300) sec= Section ("ITI1120", "Section E") sec . add (s1)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
