Vehicle
don't have default constructor hence you have to call its constructor form humanPowered
class passing required arguments at the first line of its constructor.
public humanPowered(String aDescription, String aIdNumber, int aNumWheels, int aCalories)
{
super(aDescription,aIdNumber,aNumWheels);
...//other code
}
Points to remember:
- Every class have default constructor that is no-argument constructor
- If class creates a constructor passing arguments then by default constructor is not created
- Each constructor by default calls default constructor of its super-class