Beavis
October 5th, 1999, 11:17 PM
I came across a problem where I have to implement a takeTestDrive method that takes two parameters:vehicle of type Car and miles of type int. The former is the Car object being test-driven and the later is the number of miles driven. The method adds the miles indicated to the mileage instance field or variable of the Car object. (I have a Car class created already)
I have followed the text guide and attemped the following...
public vehicle takeTestDrive(vehicle car)
{
return(car);
}
public int takeTestDrive(int mileage)
{
return(mileage);
}
...But then when I compile it...this comes up...
C:\>javac Customer1.java
Customer1.java:62: Class vehicle not found.
public vehicle takeTestDrive(vehicle car)
^
1 error
...am I missing something here...your help is very much appreciated...
I have followed the text guide and attemped the following...
public vehicle takeTestDrive(vehicle car)
{
return(car);
}
public int takeTestDrive(int mileage)
{
return(mileage);
}
...But then when I compile it...this comes up...
C:\>javac Customer1.java
Customer1.java:62: Class vehicle not found.
public vehicle takeTestDrive(vehicle car)
^
1 error
...am I missing something here...your help is very much appreciated...