Need help with Intro to Computer Science 2 (Python) problem:

Do not define any variables in the classes below (

Do not define any variables in the classes below (e.g. self.x for some variable name x) other than the ones specified in the assignment description. If you believe you can’t write a solution without defining extra variables, please ask so that I can give you suggestions. You are absolutely encouraged to use as many local variables (e.g. x for some variable name x) as you desire 1. Using the time module (discussed during class or in Section 4.5 of the textbook implement a class Vehicle (that is a subclass of the object class) supporting five methods: nit 0 which takes a string representing a model as a parameter and an integer representing model year. If the string for the model is non-empty and the value given for the model year is present, the constructor uses those to initialize the model and model year of the Vehicle. The constructor can also take only one parameter or none. Given one parameter, it uses that as the name and uses 2016 as the model year. Given no parameters it uses “Beater” as the model of the Vehicle and 2000 as the model year. Make sure to set the defaults in the header for the function as demonstrated in class. b. age0 which returns the age of the Vehicle. It must use the function localtime0 from the time module to compute the age of the person. It should do this by subtracting the person’s birth year from the current year, which again, is obtained from the localtime0 function. The age should not be stored in a variable in the object since the age can potentially change as time passes c. model 0 which returns the model of the vehicle d. repr 0 which returns the canonical representation of the vehicle e. str 0 which returns a nicely formatted version of the vehicle, an example of which can be seen below. Note that this method should NOT duplicate the work done in the age method. Instead it should call the age method The following shows how the Vehicle class and its methods could be used my Car Vehicle Focus myCar age my Car Vehicle (Focus 1) print (myCar) This Focus is 1 years old your Car Vehicle your car. age 17 your Car Vehicle (Beater 17) print (your Car) This Beater is 17 years old. Show transcribed image text Do not define any variables in the classes below (e.g. self.x for some variable name x) other than the ones specified in the assignment description. If you believe you can’t write a solution without defining extra variables, please ask so that I can give you suggestions. You are absolutely encouraged to use as many local variables (e.g. x for some variable name x) as you desire 1. Using the time module (discussed during class or in Section 4.5 of the textbook implement a class Vehicle (that is a subclass of the object class) supporting five methods: nit 0 which takes a string representing a model as a parameter and an integer representing model year. If the string for the model is non-empty and the value given for the model year is present, the constructor uses those to initialize the model and model year of the Vehicle. The constructor can also take only one parameter or none. Given one parameter, it uses that as the name and uses 2016 as the model year. Given no parameters it uses “Beater” as the model of the Vehicle and 2000 as the model year. Make sure to set the defaults in the header for the function as demonstrated in class. b. age0 which returns the age of the Vehicle. It must use the function localtime0 from the time module to compute the age of the person. It should do this by subtracting the person’s birth year from the current year, which again, is obtained from the localtime0 function. The age should not be stored in a variable in the object since the age can potentially change as time passes c. model 0 which returns the model of the vehicle d. repr 0 which returns the canonical representation of the vehicle e. str 0 which returns a nicely formatted version of the vehicle, an example of which can be seen below. Note that this method should NOT duplicate the work done in the age method. Instead it should call the age method The following shows how the Vehicle class and its methods could be used my Car Vehicle Focus myCar age my Car Vehicle (Focus 1) print (myCar) This Focus is 1 years old your Car Vehicle your car. age 17 your Car Vehicle (Beater 17) print (your Car) This Beater is 17 years old.