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...


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.



Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here