Assignment |
In this assignment you will create a class called Balloon that models a (perfectly) spherical balloon that is being filled with air. The class should have an attribute called "volume" and also have the following methods:
Next, create a test class to show that your Balloon class works correctly. It should ask the user to input an amount of air to be added to the balloon, and then report its volume, surface area, and radius.
Solution is here: Balloon.java and
BalloonTest.java. Check them after you're finished. |