/*
     In this file we define the Balloon class.
     In this example we add a new data field, color,
     to our Balloon class, and we add a method to change
     this data field.
*/
import java.awt.*;

class Balloon{
    private int diameter;
    private int xCoord, yCoord;
    private Color balloonColor;

    public Balloon(int initialDiameter, int initialX, int initialY) {
        diameter = initialDiameter;
        xCoord = initialX;
        yCoord = initialY;
        balloonColor = Color.black;
    }

    public Balloon(int initialDiameter, int initialX, int initialY,
                   int initialRed, int initialGreen, int initialBlue) {
        diameter = initialDiameter;
        xCoord = initialX;
        yCoord = initialY;
        balloonColor = new Color(initialRed, initialGreen, initialBlue);
    }

    public void changeColor(int newRed, int newGreen, int newBlue) {
        balloonColor = new Color(newRed, newGreen, newBlue);
    }

    public int getRed( ) {
        return balloonColor.getRed();
    }

    public int getGreen( ) {
        return balloonColor.getGreen();
    }

    public int getBlue( ) {
        return balloonColor.getBlue();
    }

    public void display(Graphics g) {
        g.setColor(balloonColor);
        g.fillOval (xCoord, yCoord, diameter, diameter);
        g.setColor(Color.black);
    }

    public void changeSize(int change) {
        diameter = diameter + change;
    }

    public int getSize( ) {
        return diameter;
    }

    public void move(int xCoord, int yCoord) {
        this.xCoord = xCoord;   //notice that there are two different "xCoord" variables
        this.yCoord = yCoord;
    }

    public int getXCoord( ) {
        return xCoord;
    }

    public int getYCoord( ) {
        return yCoord;
    }
}