How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask ATLProg Your Own Question

ATLProg
ATLProg, Software Engineer
Category: Homework
Satisfied Customers: 9151
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
44910485
Type Your Homework Question Here...
ATLProg is online now
A new question is answered every 9 seconds

I see this question has already been asked and there is an

This answer was rated:

I see this question has already been asked and there is an answer available:
Requirements
Pig
is
a
folk
jeopardy
dice
game
with
simple
rules:
Two
pla yers
race
to
reach
100
points.
Each
turn,
a
player
repeatedly
rolls
a
die
until
either
a
1
("pig")
is
rolled
or
the
player
holds
and
scores
the
sum
of
the
rolls
(i.e.
the
turn
total).
At
any
time
during
a
player's
turn,
the
player
is
faced
with
two
decisions:
• roll
-­‐
If
the
player
rolls
a
o 1:
the
player
scores
nothing
and
it
becomes
the
opponent's
turn.
o 2
-­‐
6:
the
number
is
added
to
the
player's
turn
total
and
the
player's
turn
continues.
• hold
-­‐
The
turn
total
is
added
to
the
player's
score
and
it
becomes
the
opponent's
turn.
Write
a
program
that
simulates
a
player
in
the
game
who
follows
the
strategy
of
“roll
until
the
turn
total
is
greater
than
or
equal
to
20
then
hold”.
Play
10
turns
in
the
simulation
to
get
a
total
score
for
the
player.
Declare
and
use
the
following
methods
appropriately.
You
will
only
receive
full
credit
if
these
methods
are
properly
used
in
your
solution.
• public
static
int
roll();
o Generates
a
random
dice
roll
value
and
returns
it.
• public
static
int
playTurn();
o Plays
a
single
turn
for
the
player,
printing
the
roll
values
and
returning
the
final
turn
total.
The
method
returns
when
the
player
rolls
a
1
or
isHold(…)
is
true.
• public
static
boolean
isHold(int
turnTotal);
o Returns
true
if
the
turnTotal
meets
the
hold
criteria
for
the
player’s
strategy
(i.e.
hold
at
20
or
greater).
Returns
false
if
the
player
shouldn’t
hold
and
should
continue
the
turn.
The
output
must
be:
• For
each
turn,
print
a
line
with
“Turn:”
and
the
turn
number.
• For
each
roll,
print
a
line
with
“Roll:

and
the
random
die
roll
value
(1-­‐6).
• At
the
end
of
each
turn,
print
“Turn
total:

and
the
turn
total.
• At
the
end
of
the
game,
print
“Game
total:

and
the
total
score.
HI, How soon si this needed ?
Customer: replied 3 years ago.

I need it by Sunday, June 30th by noon EST.

THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
ATLProg and 2 other Homework Specialists are ready to help you