Q2) Using Classes and Objects you need to create a Vehicle class with max_speed and company as instance attributes and show_det() as instance method. Create a Child class Car that will inherit all the attributes of Vehicle, the class Car should have a class attribute capacity with value = 4 and an instance variable state (to show if new or second hand). Class Car should have two methods one instance method (override the parent’s method) to display all the instance attributes and the other class method to display all the class attributes.
Please do in Python.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here