Oh. I got it. Thanks!
Type: Posts; User: miss confused
Oh. I got it. Thanks!
Feedback:
The constructor you have written doesn't match the constructor call in the problem specification.
Output was not:
My car traveled 400.48 miles on 21.4 gallons of gasoline.
My mileage...
What's wrong with this?
private double distance;
private int fuel;
public AutoTrip(double miles, int gallons){
distance = miles;
fuel = gallons;
Oh sorry, I forgot to put it in brackets code.
Main Method:
public class Driver
{
public static void main(String[] args)
{
double distance = 400.48;
double fuel = 21.4;
AutoTrip myTrip = new AutoTrip(distance, fuel);
...