public class Car1	//call drive() from a new object, what is honda, or shevy
{
	int miles, total;
	String dir;

	public static void main(String[] args)
	{
		Car1 honda = new Car1();
		honda.drive(10, "south");
		honda.drive(40, "west");

		System.out.println("\n");

		Car1 shevy = new Car1();
		shevy.drive(100, "east");
		shevy.drive(200, "west");

		//Car_instance.drive(100, "west"); 	//--cannot do this since drive()
							//doesn’t know what car to add to.
	}



	public void drive (int miles, String dir)
	{
		total+=miles;	// miles will be totaled to the particular car c1
				  	//(since we called this method from object c1)

		System.out.println("Driving " +dir+ " " +miles+ " miles");
		System.out.println("  Total miles " +total);
	}
}
