/**
 * An accident report
 *
 * @version 1.0
 * @author  David Bernstein, James Madison University
 */

public class AccidentReport implements Prioritized
{
    private int     size;
    private String  type;


    /**
     * Construct a new AccidentReport
     *
     * @param type   The type of accident
     * @param size   The number of vehicles involved
     *
     */
    public AccidentReport(String type, int size)
    {
	this.type = type;
        this.size = size;
    }



    /**
     * Return the priority of this AccidentReport
     * (part of being Prioritized)
     *
     * @return   The priority of this AccidentReport
     */
    public int getPriority()
    {
	int priority;


	if (size > 3) priority = 5;
        else if (size > 5) priority = 10;
	else if (type.equals("HEAD ON")) priority = 8;
	else priority = 3;

	return priority;
    }




    /**
     * Set the size of the accident 
     *
     * @param size   The number of vehicles involved
     */
    public void setSize(int size)
    {
	this.size = size;
    }


}
