Question: b. #Define a base class Person, having attributes name, birthdate and city. Define the class Student that derives from Person class which ishaving attributes like

 b. \#Define a base class Person, having attributes name, birthdate and

b. \#Define a base class Person, having attributes name, birthdate and city. Define the class Student that derives from Person class which ishaving attributes like rollno, branch, totalMarks and year as data member. The class should contain the instance method init and the abstract method percentage. Define two classes Grad and PostGrad which inherit from the base class Student. Both the classes should define their init method which asks user to enter totalMarks value and should override the abstract method percentage of the superclass. Note that totalMarks obtained are out of 600 and 400 for Grad andPostGrad classes respectively

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!