menu
QAmmunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
How do I write code in Java for "A spinner for a game has four possible options: blue, red, yellow, green. The chance of landing on each option is equal. Simulate using the spinner 15 times and reporting
asked
Dec 7, 2020
54.8k
views
5
votes
How do I write code in Java for "A spinner for a game has four possible options: blue, red, yellow, green. The chance of landing on each option is equal. Simulate using the spinner 15 times and reporting the resulting color."?
Computers and Technology
high-school
Sixta
asked
by
Sixta
8.4k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
5
votes
What you need to do is to generate a random number between 1 and 4(or0 and 3) 15 times. Each time you generate a number, you figure out which number it is and keep track of how many times you’ve seen that number. At the end, print out how many of each number you got.
Good luck!
Celeriko
answered
Dec 13, 2020
by
Celeriko
8.1k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Jun 16, 2024
90.7k
views
The project must be written in C++ or Java. This project will simulate disk allocation methods The project will allow the user to choose an allocation method from among the three presented in the textbook.
Krystian Sakowski
asked
Jun 16, 2024
by
Krystian Sakowski
8.5k
points
Computers and Technology
high-school
1
answer
4
votes
90.7k
views
asked
Apr 17, 2024
141k
views
Write a Java program to simulate a "mexican wave" on a String. Within your program, create a method called wave which takes one String as an input. This method should return an array of stages in the wave.
Naseema
asked
Apr 17, 2024
by
Naseema
8.0k
points
Computers and Technology
high-school
1
answer
5
votes
141k
views
asked
Mar 5, 2024
180k
views
Write a Java console program to design the Snake game. With every 5 steps, the snake will grow by 1. Do not use Swing/Applet or any UI components.This is a java console application. Simulate the game run
Bongeh
asked
Mar 5, 2024
by
Bongeh
7.5k
points
Computers and Technology
high-school
1
answer
0
votes
180k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.5m
questions
12.2m
answers
Other Questions
“What does it mean when we “rework” copyrighted material?”
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
Disadvantages of using animation in advertising? advantages and disadvantages of using animation for education? advantages and disadvantages of using animation in entertainment?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org