Hey my name Josh and im in a intro to java programing class as we speak and my teacher offered me extra credit if i could figure out this problem so hopefully this forum can help.
im new to this so i applogize if this is the in the wrong format
public abstract class Vehicle { private String powerSource; private int wheels; protected int price; public Vehicle(String powerSource, int wheels); { setPowerSource(powerSource); setWheels(wheels); setPrice(); } public String getPowerSource() { return powerSource; } public int getWheels() { return wheels; } public int getPrice() { return price; } public void setPowerSource(String source) { powerSource = source; } public void setWheels(int wls) { wheels = wls; } public abstract void setPrice(); }
the error that comes up is:
Vehicle.java:12: error: missing method body, or declare abstract
public Vehicle(String powerSource, int wheels);
thank you ahead of time anyone who can help me get extra credit