in java language Write a program that provides a menu that allows a user to crea
ID: 3671165 • Letter: I
Question
in java language
Write a program that provides a menu that allows a user to create, destroy, and inflate balloon objects in an array that holds five balloon objects. Make all balloon attributes private variables and provide getters, setters and constructors where needed. Support these menu options:
1. Create a balloon with a color and size if there is room in the array.
a. Validate room is available using a method isArrayFull().
b. Validate the size from this list (6, 8, 10, 12) using a method isValidSize()
c.Validate the color from this list (red, blue, green, yellow) using a method isValidColor()
2. List all balloons: size, color, inflated using a toString() method
3. Inflate a balloon if it exists and if it is not currently inflated. Provide a method isValidBalloon() and isBalloonInflated() for validation.
4. Destroy a balloon if it exists. Validate it exists by using the method isValidBalloon()
5. Print the number of balloons that exist
6. Quit
Explanation / Answer
Consider the following program:
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.