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 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
Get step-by-step solutions from verified subject matter experts
