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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education