Need program that outputs the lyrics for ninety-nine bottles

Assignment Help JAVA Programming
Reference no: EM131914468

Need 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.

Reference no: EM131914468

Questions Cloud

Prepare a consolidated balance sheet working paper : Prepare consolidated balance sheet working paper, assuming Webnet Solutions is acquiring company and issues $200 million in stock for all of stock of Microtech.
Compute taxable income and income taxes payable : Prior to 2012, taxable income and pretax financial income were identical. Compute taxable income and income taxes payable for 2013
What is chongleul : What is Chongleul, the author's thesis (claim), her "I Say"? Is the thesis indeed a "new interpretation" as the title claims?
What is the book value of old machine today : Bulldog Inc. purchased a leather-cutting machine seven years ago. What is the book value of the old machine today?
Need program that outputs the lyrics for ninety-nine bottles : 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
What is the average cost assigned to each unit included : Mickley Company's predetermined overhead rate is $20.00. If Job A-500 consists of 80 units, what is the average cost assigned to each unit included in the
Should the legal system restrain mcdonald use of toys : In 2010, the Center for Science in the Public Interest and a concerned parent sued McDonald's for deceptive advertising by using toys in Happy Meals.
What focal length do you think was used in the scene : What focal length do you think was used in the scene? What type of depth of field: shallow or great?
Pv of pension liability of each retirement cohort : What is the total value of your pension liabilities as of now? Hint: The total value of your pension liabilities will be the sum of the PV of pension liability

Reviews

Write a Review

JAVA Programming Questions & Answers

  Build a thread system

Identify all Nachos classes that you will modify and where you plan to do you modifications - Identify all classes that you plan to implement and give the API for each class,

  Write java program that display a welcoming message

Write a complete Java program with the following specifications: Display a welcoming message such as: "Welcome to Cubing Program!" Prompt the user twice to enter two positive whole numbers, indicating starting and finishing values, first one being s..

  A method that takes a two-dimensional array

A method that takes a two-dimensional array of int's as a parameter and searches the array for the second parameter, returning true if the second parameter matches any of the integers in the array, and false otherwise.

  The data file being used contains records

The data file being used contains records with an employee's name, the number of hours they worked, and their hourly pay rate. Write a program to read the records of information and output (to the Output window or a dialog box) the employee's name..

  Design a class named clock

Design a class named Clock. You should use your IDE for this exercise. The class contains private data fields for startTime and stopTime, a no argument constructor that initializes the startTime to the current time

  Virtual machine forensics

Determine what you perceive to be the greatest challenge when dealing with virtual machines from a system forensics perspective. Provide a rationale with your response.

  Exception handling in method overriding

1. Print prime numbers? 2. Exception handling in method overriding

  Write a simple application which implements the stockwatcher

Write a simple application which implements the StockWatcher interface (attached file)

  The license plate game and csv parsing

Resulting method will correctly estimate that there are two syllables in quokka and two syllables in springbok, though it does get the number of syllables

  1 rock-paper-scissors simplejavaproblems 1-3 are based on

1 rock-paper-scissors simple.javaproblems 1-3 are based on the rock-paper-scissors game. if you are unfamiliar with

  Write a test program that creates an array

Design an interface named Colorable with a void method named howToColor(). Every class of a colorable object must implement the Colorable interface.

  Explain how parameter passing by value and by reference

Briefly explain how parameter passing by value and by reference is accomplished in memory. Write statement 1 to call Method A below.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd