//Here is my simple class for MyCar
public class MyCar
{
private int odometer;
private int speed;
private int gear;
public MyCar() //send values to member variables in this default constructor
{
odometer = 0;
speed = 0;
gear = 0.0;
}
public MyCar(int od, int sp, int gr) //constructor passing values;
{
odometer = od;
speed = sp;
gear = gr;
}
//accessors
public int getOdometer() //accessors have no parameters
{
return odometer;
}
public int getSpeed()
{
return speed;
}
public int getGear()
{
return gear;
}
//mutators
public void changeOdometer(int od)
{
odometer = odometer + od;
}
public void changeSpeed(int sp)
{
spead = sp;
}
public void changeGear(int gr)
{
gr = gr;
}
}`
What I need to do is write Java code for a Parts interface for MyCar. The signatures should be named get and set. Let odometer, speed, and gear classes implement the interface. Let the generic class that uses the interface be named MyCar. Somebody please help I am totally lost with this interface stuff.