- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHand.java
More file actions
Latest commit
21 lines (21 loc) · 436 Bytes
/
Copy pathHand.java
File metadata and controls
21 lines (21 loc) · 436 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
* a Hand is just like a CardCollection, but
* it provides an additional method.
*/
publicclassHandextendsCardCollection
{
publicHand(Stringlabel)
{
super(label);
}
//??So only Hand objects have access to the display method????
publicvoiddisplay()
{
System.out.println(getLabel() + ":");
for(inti = 0; i < size(); i++)
{
System.out.println(getCard(i));
}
System.out.println();
}
}