JAVA- Write a program that outputs the lyrics for “Ninety-nine Bottles of Beer on the Wall.”
Write a program that outputs the lyrics for “Ninety-nine Bottles of Beer on the Wall.” Your program should print the number of bottles in English, not as a number. For example: Ninety-nine bottles of beer on the wall, Ninety-nine bottles of beer, Take one down, pass it around, Ninety-eight bottles of beer on the wall. ... One bottle of beer on the wall, One bottle of beer, Take one down, pass it around, Zero bottles of beer on the wall.
Your program should not use ninety-nine output statements! Design your program with a class named BeerSong whose constructor takes an integer parameter that is the number of bottles of beer initially on the wall. If the parameter is less than zero, set the number of bottles to zero. Similarly, if the parameter is greater than 99, set the number of beer bottles to 99. Then make a public method called PrintSong that outputs all stanzas from the number of bottles of beer down to zero. Add any additional private methods you find helpful.
10 years ago
3
Purchase the answer to view it

- beersongs.zip
- MKT/575 MKT 575 MKT575 WEEK 5 FINAL EXAM LATEST
- Wave Motion and Sound
- nursing theory 2
- cnt4
- multiple choice - ECON
- payment-link
- The Rookie Chief Information Security Officer
- Home work 2
- How will you substitute the direct object inthe following sentences? Yo necesito un coche Nosotros comemos patatas Los estudiantes estudian francés Ellos beben el...
- I need this done within the next 5 hours.can anyone so this