Create a Class Car with the following instancevariables: model (String), Brand
(String), maxspeed (double) Note:use encapsulation (all variables are private). (3 Marks)
Create a non-default constructor for Class Carwhich takes 3 parameters. (2 Marks)
Create a get and set methods for instance variablemodel variable only. (2 Marks)
Create PrintInfo() method which prints all three instancevariables. (2 Marks)
Create a subclass GasCar with instance variableTankSize (double).. (2 Marks)
Create a non-default constructor for sub-classGasCar which takes 4 parameters. (2 Marks)
Override PrintInfo() method which prints all four parameters. (2Marks)
Create a subclass ElectricCar with instancevariable BatteryPower (double). (2 Marks)
Create a non-default constructor for
PayPal Gateway not configured
PayPal Gateway not configured