Question: (A) Scenario: The students at MIT have a database. It can be designed in OOP paradigm by creating a class Student. The class holds the
(A) Scenario: The students at MIT have a database. It can be designed in OOP paradigm by creating a class Student. The class holds the following information about each student: studentName, studentID, unitsEnrolledList. The following two students are already in the database: Shankar, MIT123, [BN101,BN102,BN103] Danny, MIT321, [BN101, BN202, BN300] i. Design the class Student with appropriate attributes and methods from the given scenario. Save this as a Student module (Student.py) which will be called in following questions. ii. Draw the UML of class Student. iii. Load the pre-existing data: Import the module Student in a new script called dataProcessing.py . Create two objects obj1, obj2, with the info of both students given above. iv. Add new data: In dataProcessing.py , Create a new object, obj3, and pass some data to this object as shown in sample data above. [6+2.5+5+1 Marks] BN108 - Programming for Networking - Final Assessment Trimester 3, 2020 Page 6 of 8 (B) Create a new method in class Student, common_units(). This method can tell a student who else is enrolled in the same units. obj2.common_units(obj1). (Hint: Compare the unitsEnrolledList and find out which items are common using in keyword). This method should process the result and output the following statement: Dear ___ , you and ____ are studying similar units: _____. Example: Dear Shankar, you and Danny are studying similar units: BN101. [5 Marks] (C) Draw the updated UML of class Student. This should include the new method. [2.5 Marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
