This program will + your job to write Enter the positive number up to which you want the game played: 25 Bizz 4 Buzz Bizz Bizz Buzz 11 вizz 13 14 BizzBuzz 16 17

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section: Chapter Questions
Problem 14PP
icon
Related questions
icon
Concept explainers
Question

Computer programming. Java. 

In the game of BizzBuzz, players generally sit in a circle. The player designated to go first says the number "1", and each player
thenceforth counts one number in turn. However, any number divisible by three is replaced by the word bizz and any divisible by five
by the word buzz. Numbers divisible by both become bizzbuzz. A player who hesitates or makes a mistake is eliminated (or is required
to pay some penalty).
You are to write a program, BizzBuzz.java, that prompts the user to enter a positive number, and then you will play the game, printing
the results to the screen. You are also required to keep track of the number of times the word bizz is said, the number of times the word
buzz is said, and the number of times that bizzbuzz is said while the game is being played up to the desired ending number. Note that
when a number is divisible by both three & five, it counts as a single bizzbuzz and does not contribute to the count of bizzes or buzzes.
Additional requirements: Start the program by giving a short explanation of what the program will do. Then prompt the user for the
ending number for which the game is to be played. If the number specified by the user is not positive (i.e., it is negative or zero), the
program should throw an IllegalArgumentException. Your program must use a loop that iterates over all the values from 1 up
to the desired max that are to be considered, and tests each number appropriately.
BizzBuzz.java Example Execution (user input in green)
This program will
E your job to write
===== ===== ===:
===== =======
Enter the positive number
to which you want the game played: 25
1
2
Bizz
4
Buzz
Bizz
8
Bizz
Buzz
11
Bizz
13
14
BizzBuzz
16
17
Bizz
19
Buzz
Bizz
22
23
Bizz
Buzz
The number of Bizzes was 7
The number of Buzzes was
4
And the number of BizzBuzzes was 1
Thank you for playing Bizz Buzz with me.
Transcribed Image Text:In the game of BizzBuzz, players generally sit in a circle. The player designated to go first says the number "1", and each player thenceforth counts one number in turn. However, any number divisible by three is replaced by the word bizz and any divisible by five by the word buzz. Numbers divisible by both become bizzbuzz. A player who hesitates or makes a mistake is eliminated (or is required to pay some penalty). You are to write a program, BizzBuzz.java, that prompts the user to enter a positive number, and then you will play the game, printing the results to the screen. You are also required to keep track of the number of times the word bizz is said, the number of times the word buzz is said, and the number of times that bizzbuzz is said while the game is being played up to the desired ending number. Note that when a number is divisible by both three & five, it counts as a single bizzbuzz and does not contribute to the count of bizzes or buzzes. Additional requirements: Start the program by giving a short explanation of what the program will do. Then prompt the user for the ending number for which the game is to be played. If the number specified by the user is not positive (i.e., it is negative or zero), the program should throw an IllegalArgumentException. Your program must use a loop that iterates over all the values from 1 up to the desired max that are to be considered, and tests each number appropriately. BizzBuzz.java Example Execution (user input in green) This program will E your job to write ===== ===== ===: ===== ======= Enter the positive number to which you want the game played: 25 1 2 Bizz 4 Buzz Bizz 8 Bizz Buzz 11 Bizz 13 14 BizzBuzz 16 17 Bizz 19 Buzz Bizz 22 23 Bizz Buzz The number of Bizzes was 7 The number of Buzzes was 4 And the number of BizzBuzzes was 1 Thank you for playing Bizz Buzz with me.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT