Class Car

java.lang.Object
  extended byCar

public class Car
extends Object

This class models the Cars that can be parked in a ParkingLot.


Constructor Summary
Car(String brand, int modelYear)
          Remember the brand and year.
 
Method Summary
 String getBrand()
          Return the brand name of this Car.
 int getYear()
          Return the model year of this Car.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Car

public Car(String brand,
           int modelYear)
Remember the brand and year.

Parameters:
brand - the brand name of the manufacturer (eg, Ford)
modelYear - the marketing year of this car
Method Detail

getBrand

public String getBrand()
Return the brand name of this Car.

Returns:
the brand name of this Car

getYear

public int getYear()
Return the model year of this Car.

Returns:
the model year of this Car