1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
guapka [62]
3 years ago
9

SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN JAVA. Assume that the classes listed in the Java Quick R

eference have been imported where appropriate. Unless otherwise noted in the question, assume that parameters in method calls are not null and that methods are called only when their preconditions are satisfied. In writing solutions for each question, you may use any of the accessible methods that are listed in classes defined in that question. Writing significant amounts of code that can be replaced by a call to one of these methods will not receive full credit. This question involves a game that is played with multiple spinners. You will write two methods in the SpinnerGame class below. public class SpinnerGame { /** Precondition: min < max * Simulates a spin of a spinner by returning a random integer * between min and max, inclusive. */ public int spin(int min, int max) { /* to be implemented in part (a) */ } /** Simulates one round of the game as described in part (b). */ public void playRound() { /* to be implemented in part (b) */ } } (a) The spin method simulates a spin of a fair spinner. The method returns a random integer between min and max, inclusive. Complete the spin method below by assigning this random integer to result. /** Precondition: min < max * Simulates a spin of a spinner by returning a random integer * between min and max, inclusive. */ public int spin(int min, int max) { int result; return result; }

Computers and Technology
1 answer:
adoni [48]3 years ago
4 0

Answer:

Check the explanation

Explanation:

Player 1 Coin

Player 2 Coin

Player 1

Player 2

Round

Count at

Count at

Player

Player

Coin

Coin

Number

Beginning of

Beginning of

1

2

Outcome

Count at

Count at

Round

Round

Spends

Spends

End of

End of

Round

Round

Off-by-

one,

10 - 1

10

10

2

player 2

10 - 2

+

= 8

1

gains 1

= 10

coin

Same,

10 - 2

2

8

10

2

2

player 2

-

gains 1

6

+

=

1

=

9

coin

Off-by-

two,

6 - 1

+

3

6

9

3

player 1

2

9 - 3

gains 2

=

=

7

6

coins

Same,

4

7

6

2

2

player 2

7 - 2

6 - 2+

gains 1

=

5

=

coin

5

Kindly check the attached image below to see the well arranged table to solve the above question.

You might be interested in
What is output if the user types in 8
Lady_Fox [76]

Answer: 8

And if you hold shift while typing it, it gives *

7 0
3 years ago
You can access various sites on the WWW by using hyperlinks or by
Tresset [83]
Or by searching up the desired content and or information on a search engine. I believe.
5 0
3 years ago
Which of the following are incorrect? Group of answer choices An interface can contain constructors. You may declare a final abs
spin [16.1K]

Answer:

Explanation:

1. The answer is No, interface cannot have constructors. ... In order to call any method we need an object since there is no need to have object of interface, there is no need of having constructor in interface (Constructor is being called during creation of object).

2.A final class is considered complete and can not be subclassed (It's methods can not be overridden ). In case of abstract class, we have to proved implementation to abstract methods in subclasses. A final class can not have abstract methods and an abstract class can not be declared final.

3.private constructors are acceptable, however the class should be marked final instead, as doing so means the class is to be extended.

4.Yes! Abstract classes can have constructors! Yes, when we define a class to be an Abstract Class it cannot be instantiated(i.e an object cannot be created) but that does not mean an Abstract class cannot have a constructor. Each abstract class must have a concrete subclass which will implement the abstract methods of that abstract class.

6 0
3 years ago
Read 2 more answers
A ______ or workstation computer is typically used by one or a small number of people to perform everyday productivity tasks, su
sveta [45]

Answer:

Desktop

Explanation:

A desktop computer is a personal computing machine designed to be used on top of a usual office desk.

It accommodate in it the physical hardware that makes a computer run and connects to input devices like the mouse, monitor, and keyboard users interact with. Desktop computers are mostly used in enterprise and business environment, including in consumer use cases such as for gaming. In the enterprise, they are vital since they are the major medium for many users to do their day to day jobs.

6 0
3 years ago
What option do you use to create an urgent presentation
Art [367]
Microsoft power point, ya que es muy facil de manejar y pueden realizarse presentaciones en menos de 20 minutos
3 0
3 years ago
Other questions:
  • One main advantage of CD-ROMs is that..
    7·1 answer
  • How to jail break iphone 7 with <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7617023602">[email&#160
    11·2 answers
  • a ____ consists of wires connecting the cpu and other parts of the computer. The _____ transfers data between CPU and memory uni
    6·1 answer
  • Are self driving cars essential for the future of transportation
    10·1 answer
  • How do you do basic addition and subtraction in binary, octal and hex?
    12·1 answer
  • What do u say to your bf if he says sayy lesssss
    14·2 answers
  • Complete the statement below with the correct term.
    5·1 answer
  • What's the answer plssss​
    10·1 answer
  • Can someone write this in java? Also, does anyone know how to do Edhesive assignments?
    15·1 answer
  • What is the minimum number of bits you would need to represent a number on a 0 to 10 scale
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!