I have to write a program to display the lyrics to the beer song. I can't get my program to compile and I dont think it has everything it needs either.
Thanks for the help. Here are the instructions for the program:
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 different output statements!
Design your program with a class named BeerSong whose constructor takes an integer parameter that is the number of bottles of beer that are 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.
In this exercise,
you should implement a constructor for the BeerSong class that takes a single parameter of type int that specifies the number of bottles of beer. You should also implement a method named printNumInEnglish that takes a single int parameter specifying a number to be printed (in English) to the console.
Here is my code so far:
Here are my errors:
The method exit(int) in the type System is not applicable for the arguments ()
The method printNumInEnglish() in the type BeerSong is not applicable for the arguments (int)
The method printNumInEnglish() in the type BeerSong is not applicable for the arguments (int)
The method printNumInEnglish() in the type BeerSong is not applicable for the arguments (int)