/*                                      
 * Musician.java 
 *
 * Version: 
 *     $Id: Musician.java,v 1.1 2002/03/17 12:52:21 jmg Exp $ 
 * 
 * Revisions: 
 *     $Log: Musician.java,v 
 *     Revision 1.1  2002/03/17 12:52:21  jm
 *     Initial revisio
 * 
 */

/**
 * Musician class.  Represents a musician that needs to get paid
 *
 * @author Joe Geigel
 */
public class Musician extends Performer {

    /**
     * The instrument that the musician can play
     */
    private Instrument myInstrument;

    /**
     * The rate per performance that a musician gets paid
     */
    private static final double PAYRATE = 100.0;

    /**
     * Constructs a musician
     *
     * @param name The musician's name
     * @param I the instrument that the musician can play
     */
    public Musician(String name, Instrument I)
    {
	super(name, PAYRATE);
	myInstrument = I;
    }

    /**
     * Caculates and returns the weekly pay
     *
     */
    public double calculatePay()
    {
	return getBasePay() + myInstrument.getWeeklyRental();
    }

    /**
     * Returns a string representation of the object.
     *
     * @returns A string representation of the object
     */
    public String toString()
    {
	return "I am a musician";
    }
}
