-
Notifications
You must be signed in to change notification settings - Fork 0
/
nonclient class 1
63 lines (62 loc) · 1.34 KB
/
nonclient class 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/******************************************************************************
Eric Zhang
Comp Sci 3
March 23, 2021
High-Low Program
*******************************************************************************/
public class Card
{
private int value; //Ace is 1 11-13 will be JQK
private String suit;
public Card()
{
value = -1;
suit = "suit";
}
public Card (int v, String s)
{
value = v;
suit = s;
}
public int getValue ()
{
return value;
}
public String getSuit ()
{
return suit;
}
public String showValue ()
{
switch(value)
{
case 1:
return "Ace";
case 2:
return "Two";
case 3:
return "Three";
case 4:
return "Four";
case 5:
return "Five";
case 6:
return "Six";
case 7:
return "Seven";
case 8:
return "Eight";
case 9:
return "Nine";
case 10:
return "Ten";
case 11:
return "Jack";
case 12:
return "Queen";
case 13:
return "King";
}
return "oops";
}
}