/**
 * COSC 60 Demo
 * Inheritance Example
 * @author Adam Koehler
 * @version 1.0,  &nbsp; 2008 Oct 22
 */

public class Vehicle
{
    private int wheels;     /* number of wheels on the vehicle */
    private int occupants;  /* max number occupants */
    private int filledSpots;  /* current number of occupants */

    public Vehicle()
    {
        wheels = 0;
        occupants = 0;
    }

    public Vehicle(int w, int o)
    {
        wheels = w;
        occupants = o;
    }

    public void setWheels(int w)
    {
        wheels = w;
    }

    public int getWheels()
    {
        return wheels;
    }
    
    public int getFilledSpots()
    {
        return filledSpots;
    }

    public void setOccupants(int o)
    {
        wheels = o;
    }

    public int getOccupants()
    {
        return occupants;
    }

    public boolean full()
    {
        return (filledSpots >= occupants);
    }

    public boolean addOcc()
    {
        boolean result = false;

        if (!(filledSpots <= occupants))
            result = false;
        else
        {
            filledSpots++;            
            result = true;
        }            
        return result;
    }



}

