[SOLVED] java

30 $

Starting from the Deck.java class , add 2 cut methods.

The first cut method should take in the cutpoint as a parameter.

The second cut method should generate a random cutpoint and then should just call the other cut method
with this random cutpoint value as a parameter.

Create another class named TestDeck that contains a main method. In it, create a Deck (by instantiating
an object of type Deck (that is, declare a variable of type Deck and call the Deck constructor). Then
call the toString method within Deck and print what it returns. Then call the first cut method (the one
that takes in a value for cutpoint via the parameter) — try it with say 10 like we did in class. Then
call the toString again and print what it returns to see if indeed the first 11 cards are now placed at the
bottom of the deck.
(Note: before dealing the 10 Cards, you’ll need a Deck that is created, shuffled and cut.)
(已经有shuffled method,要加cut method)
============================================
Starting from the Deck.java class , add 2 cut methods.

The first cut method should take in the cutpoint as a parameter.

The second cut method should generate a random cutpoint and then should just call the other cut method
with this random cutpoint value as a parameter.

Create another class named TestDeck that contains a main method. In it, create a Deck (by instantiating
an object of type Deck (that is, declare a variable of type Deck and call the Deck constructor). Then
call the toString method within Deck and print what it returns. Then call the first cut method (the one
that takes in a value for cutpoint via the parameter) — try it with say 10 like we did in class. Then
call the toString again and print what it returns to see if indeed the first 11 cards are now placed at the
bottom of the deck.
On Saturday, December 5, 2015 3:08 AM, Shirley Chien <[email protected]> wrote:
(Note: before dealing the 10 Cards, you’ll need a Deck that is created, shuffled and cut.)
(已经有shuffled method,要加cut method)
============================================
Starting from the Deck.java class , add 2 cut methods.

The first cut method should take in the cutpoint as a parameter.

The second cut method should generate a random cutpoint and then should just call the other cut method
with this random cutpoint value as a parameter.

Create another class named TestDeck that contains a main method. In it, create a Deck (by instantiating
an object of type Deck (that is, declare a variable of type Deck and call the Deck constructor). Then
call the toString method within Deck and print what it returns. Then call the first cut method (the one
that takes in a value for cutpoint via the parameter) — try it with say 10 like we did in class. Then
call the toString again and print what it returns to see if indeed the first 11 cards are now placed at the
bottom of the deck.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] java
30 $