@@ -23,7 +23,7 @@ public Deck() {
2323 }
2424
2525 /**
26- * Constructs a deck of n cards (null).
26+ * Constructs a deck of n cards (all null).
2727 */
2828 public Deck (int n ) {
2929 this .cards = new Card [n ];
@@ -52,39 +52,39 @@ public String toString() {
5252 return Arrays .toString (this .cards );
5353 }
5454
55+ /**
56+ * Randomly permutes the array of cards.
57+ */
58+ public void shuffle () {
59+ }
60+
5561 /**
5662 * Chooses a random number between low and high, including both.
5763 */
58- public int randomInt (int low , int high ) {
64+ private static int randomInt (int low , int high ) {
5965 return 0 ;
6066 }
6167
6268 /**
6369 * Swaps the cards at indexes i and j.
6470 */
65- public void swapCards (int i , int j ) {
71+ private void swapCards (int i , int j ) {
6672 }
6773
6874 /**
69- * Randomly permutes the array of cards .
75+ * Sorts the cards (in place) using selection sort .
7076 */
71- public void shuffle () {
77+ public void selectionSort () {
7278 }
7379
7480 /**
7581 * Finds the index of the lowest card
7682 * between low and high inclusive.
7783 */
78- public int indexLowest (int low , int high ) {
84+ private int indexLowest (int low , int high ) {
7985 return 0 ;
8086 }
8187
82- /**
83- * Sorts the cards (in place) using selection sort.
84- */
85- public void selectionSort () {
86- }
87-
8888 /**
8989 * Returns a subset of the cards in the deck.
9090 */
@@ -99,7 +99,7 @@ public Deck subdeck(int low, int high) {
9999 /**
100100 * Combines two previously sorted subdecks.
101101 */
102- public static Deck merge (Deck d1 , Deck d2 ) {
102+ private static Deck merge (Deck d1 , Deck d2 ) {
103103 return null ;
104104 }
105105
0 commit comments