/**
 * Describes a PaintJob of a cylindrical room 
 * with a domed roof
 * 
 */
public class PaintJob
{
    //add instance variables
    private double height;
    private double radius;
    private double surfaceArea;
    public static final int SQ_FT_PER_SQ_YARD = 9;


    //add other constants
    public static final double COST_PER_GALLON_OF_PAINT = 95.5;
    public static final double SQUARE_FEET_PER_GALLON = 40;
    public static final double LABOR_COST_PER_SQUARE_YARD = 100.0;
    
    //add constructor
        /**
     * Construcs a PaintJob wihthe given height and radius
     * @param theHeight the height of the cylinder
     * @param theRadius the radius of the sphere
     */
    public PaintJob(double theHeight, double theRadius)
    {
        height = theHeight;
        radius = theRadius;
    }

    //add required methods
    /**
     * Gets the surface area of te room to paint
     * @return the surface area of te room to paint
     */
    public double getSurfaceArea()
    {
        surfaceArea = 2 * Math.PI * radius * height + 2 * Math.PI * radius * radius;
        return surfaceArea;
    }
    
    /**
     * Gets the cost of the paint for this paint job
     * @return the cost of the paint for this paint job
     */
    public double getPaintCost() 
    {
	    surfaceArea = 2 * Math.PI * radius * height + 2 * Math.PI * radius * radius;
        double paintCost = surfaceArea
           / SQUARE_FEET_PER_GALLON * COST_PER_GALLON_OF_PAINT;
        return paintCost;
    }

    /**
     * Gets the cost of the labor for this PaintJob
     * @return the cost of the labor for this PaintJob
     */
    public double getLaborCharge()
    {
        double squareYards = getSurfaceArea() / SQ_FT_PER_SQ_YARD;
        return squareYards * LABOR_COST_PER_SQUARE_YARD;
    }
    
    /**
     * Gets the price to charge the customer
     * @return the price to charge the customer
     */
    public double getCustomerPrice()
    {
        return getPaintCost() + getLaborCharge();
    }

    /**
     * sets a new height for room in this paint job
     * @param theHeight the new height
     */
    public void setHeight(double theHeight)
    {
        height = theHeight;
    }

    /**
     * sets a new radius for room in this paint job
     * @param theRadius the new radius
     */
    public void setRadius(double theRadius)
    {
        radius = theRadius;
    }
}
