Define a class called Car which which is characterized by themake, model and MGP. The class should contain a compareMPG methodthat indicates which car has a better gas mileage. Define anotherclass Driver which contains a main method Inside the main method,Create two objects. The objects should be populated via user inputfor all three instance variables. Display the contents of the carthat has a better gas mileage using the compareMPG method
Expert Answer
An answer will be send to you shortly. . . . .