Question: Question 3: Design CSEStudent class and BBAStudent class which inherit from Student class so that the following code provides the expected output. [Assume, per

Question 3: Design CSEStudent class and BBAStudent class which inherit from Student
class so that the following code provides the expected output. [Assume, per  

Question 3: Design CSEStudent class and BBAStudent class which inherit from Student class so that the following code provides the expected output. [Assume, per course tuition fee is 19800. The addCourses() method in both child classes should work for any number of parameters and any type of courses ] class Student: def_init_(self, name, department): self.name = name self.department = department def_str_(self): s = f"Name: {self.name} Department: {self.department}" return s # Write your codes here. # Do not change the following lines of code. s1 = CSEStudent ("Bob", "CSE", 21101018) s1.addCourses ("CSE111","CSE230 ","CSE260","MAT120","CSE320") print('= ======') s1.showPaymentDetails() print('= print(s1) print('= s2 = BBAStudent ("Carol", "BBA", 21104007) s2.addCourses ("BUS101", "MKT201", "MGT423", "BUS201") print('= s2.showPaymentDetails() print('== print (s2) OUTPUT: Bob, your tuition fee is 99000 Name: Bob Department: CSE ID: 21101018 Course Details: 100 Level: ['CSE111', 'MAT120'] 200 Level: ['CSE230', 'CSE260'] 300 Level: ['CSE320'] Carol, your tuition fee is 79200 Name: Carol Department: BBA ID: 21104007 Course Details: 100 Level: ['BUS101'] 200 Level: ['MKT201', 'BUS201] 400 Level: ['MGT423'] 99+

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem we need to create two subclasses called CSEStudent and BBAStudent that inherit from the Student class In addition we need to override the addCourses method to sort and store the ... View full answer

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