Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Balloon.java MrG 2011.1020
- public class Balloon
- {
- private double air;
- /**
- Constructor: initialize the volume
- */
- public Balloon()
- {
- air=0;
- }
- /**
- Accessor: returns volume
- @return the volume
- */
- public double getVolume()
- {
- return air;
- }
- /**
- Mutator: modifies volume
- @param amt is how much you blow
- */
- public void addAir(double amt)
- {
- air=air+amt;
- }
- /**
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement