Your Java code must contain a class called Vehicle. The Vehicle…

Question Answered step-by-step Your Java code must contain a class called Vehicle. The Vehicle… Your Java code must contain a class called Vehicle.  The Vehicle class will contain the following data fields:                Vehicle: `                               int doors                                int wheels                                int horsepower                                int numPassengers                                double price                                String manufacturer                                int crashRatingThe class should contain all proper getters and setters.  IT MAY OR MAY NOT NEED A CONSTRUCTOR. Please justify in the comments of your code the reason you either chose to make a constructor for this class or not.  The crash rating must contain a value between 0 and 5.  The price must be a number greater than 0.  numPassengers must be a number greater than 0.  The horsepower field must be a number greater than 100. The number of wheels must be a number greater than or equal to 2 and less than or equal to 8.  The doors field must be a number greater than or equal to 0 and less than or equal to 8.  Make sure that your code validates that the data is valid and if not it rejects the input and asks the user to retry.There will be other classes that will inherit the vehicle class.  They are the following:                Truck:                                String modelName                                double cargoCapacity                                double towingCapacity                                boolean bedliner                                String type                SportUtilityVehicle:                                String modelName                                int numOfBenchSeats (values from 1 to 6)                                double towingCapacity                Motorcycle:                                String modelName                                boolean sidecar                                boolean signalLights                                boolean radio                Car:                                String modelName                                boolean convertible                                String engineTypeInclude all of the proper getters and setters for each field.  Additionally, make sure that all values are valid.  For all String variables, there are no specific values but you should only ever expect one word for each one.  ALL CLASSES SHOULD BE IN THEIR OWN FILE.  Do not forget to include a constructor for each one!  Each of the child class should have their own method that will make a string for the values of the data fields that are contained within it. Sample Input/Output:Welcome to the HFC Vehicle Solutions Program!Please choose from the following options:1.  make a Vehicle2.  View List3.  Print List4.  ExitSelection:  1Enter the type of vehicle you wish to make :1.  Truck2.  Sport Utility Vehicle (SUV)3.  Motorcycle4.  CarSelection:  1Please enter the following information about the truck:Who is the manufacturer?  FordWhat is the vehicle’s price?  42359.21How many wheels?  4How many doors?  4How many horsepower does the engine output? 245How many passengers it hold?  5What is its crash rating? 4What is the vehicle’s model?  F150What is the vehicle’s towing capacity in pounds?  7500What is the vehicle’s cargo capacity in pounds? 2000Does the vehicle have a bedliner?1.  Yes2.  NoSelection:  1What is the type of truck?  PassengerHow many of the following truck would you like to make ?Manufacturer:  FordPrice:  $42,359.21Wheels:  4Doors:  4Horsepower:  245Passengers:  5Crash Rating:  4 StarsModel:  F150Towing Capacity:  7500Cargo Capacity:  2000Bedliner:  TrueType:  PassengerNumber to create:  3The system added 3 truck(s) to the list!Please choose from the following options:1.  Create a Vehicle2.  View List3.  Print List4.  ExitSelection:  1Enter the type of vehicle you wish to create:1.  Truck2.  Sport Utility Vehicle (SUV)3.  Motorcycle4.  CarSelection:  4Please enter the following information about the car:Who is the manufacturer?  FordWhat is the vehicle’s price?  28952.32How many wheels?  4How many doors?  4How many horsepower does the engine output? 175How many passengers it hold?  5What is its crash rating? 5What is the vehicle’s mode?  MachEIs the car a convertible?1.  Yes2.  NoSelection:  2What is the engine type?  ElectricHow many of the following car would you like to create?Manufacturer:  FordPrice:  $28,952.32Wheels:  4Doors:  4Horsepower:  175Passengers:  5Crash Rating:  5 StarsModel:  MachEConvertible:  NoEngine Type:  ElectricNumber to create:  2Please choose from the following options:1.  Create a Vehicle2.  View List3.  Print List4.  ExitSelection:  2Manufacturer:  FordPrice:  $42,359.21Wheels:  4Doors:  4Horsepower:  245Passengers:  5Crash Rating:  4 StarsModel:  F150Towing Capacity:  7500Cargo Capacity:  2000Bedliner:  TrueType:  PassengerManufacturer:  FordPrice:  $42,359.21Wheels:  4Doors:  4Horsepower:  245Passengers:  5Crash Rating:  4 StarsModel:  F150Towing Capacity:  7500Cargo Capacity:  2000Bedliner:  TrueType:  PassengerManufacturer:  FordPrice:  $42,359.21Wheels:  4Doors:  4Horsepower:  245Passengers:  5Crash Rating:  4 StarsModel:  F150Towing Capacity:  7500Cargo Capacity:  2000Bedliner:  TrueType:  PassengerManufacturer:  FordPrice:  $28,952.32Wheels:  4Doors:  4Horsepower:  175Passengers:  5Crash Rating:  5 StarsModel:  MachEConvertible:  NoEngine Type:  Electric Manufacturer:  FordPrice:  $28,952.32Wheels:  4Doors:  4Horsepower:  175Passengers:  5Crash Rating:  5 StarsModel:  MachEConvertible:  NoEngine Type:  ElectricPlease choose from the following options:1.  Create a Vehicle2.  View List3.  Print List4.  ExitSelection:  3The program will print the vehicle creation list to the file.Thank you and have a great day! Engineering & Technology Computer Science COG 0050 Share QuestionEmailCopy link Comments (0)