Given the class below, correctly override Object’s equals me…
Given the class below, correctly override Object’s equals method in this class, ensuring that it compares the full state of the object (i.e. the values of all data fields).Include the method header, curly braces, and implementation in your response. public class Car { private boolean isElectric; private String modelName; /* valid constructor */ /* YOUR equals METHOD HERE */} Make sure to select the ‘Preformatted’ style from the dropdown so your code is formatted clearly. DO NOT USE THE TAB KEY WHEN WRITING CODE AS YOU MAY ACCIDENTALLY SUBMIT YOUR EXAM. USE THE SPACE BAR INSTEAD.