Given the following interface, create a class named Chevy that implements the Car interface.
public interface Car {
public double accelerate;
public double brake;
public String printErrorCode();
}
Chevy should have the following:
- Member variable named 'speed' of type double
- Member variable named 'errorCode' of type String
- Default Constructor and a Constructor that accepts the two member variables as arguments
- The default speed should be 55.75
- The default errorCode should be "Low Tire Pressure"
- To increase the car's speed, you increment speed by 1.14
- To decrease the car's speed, you decrement speed by 1.47
- toString() method that prints out the attributes of the Chevy object
You only need to create the Chevy class. You do not have to use the interface and class in a working program.