cindy - 74 Press ENTER to next round. Available cards: Baba : h4 de Cs ss ho, CA C7 d7 d8 d9, CK a da c6 d4, c4 s3 hA hx dk, do Cindy: 54 hs d) s7 SA, ha ds d) sQ c9, d2 s8 ha s9 cQ, c) h2 s2 s6 sx, SK ROUND *.. Cards at Hand: Baba : CA C7 d7 de d9 ! Point - 24 | win cindy: co d) ds ha se I Point- 10 Press ENTER to next round. *** ROUND 2 ** Cards at Hand: score: Baba- 57 Cindy- 74 Baba : es d6 h4 ho ss | Point - 13 | Min Cindy: d) hs SA s4 57 | Point - 12 Available Cards: Baba : CK c3 dA c6 d4, c4 s3 hA hx dK. do score: Baba 33 Cindy 74 Cindy: d2 sa ha s9 co. o h2 s2 s6 Sx, SK Press ENTER to next round. Available Cards: Baba : CA C7 47 đe d9, CK C) dA C6 d4, c4 s3 hA hx dK, đo Cindy: h3 ds d3 sQ c9, d2 sa ha s9 cQ, ea h2 s2 s6 sx, SK Page 4 of 7 Press ENTER to next round. *** ROUND 3*** Cards at Hand: Baba : CA C7 d7 de d9 I Point 24 | Min Cindy: c9 d) ds ha so i Point- 10 Score: Baba . 57 Cindy- 74 ROUND 4.. cards at Hand: Baba : c) c6 CK dA d4 | Point- 19 | win cindy: cQ d2 ha sa s9 | Point- 17 Available cards: Baba : CK c) da c6 d4, 4 s3 hA hX dK, dQ Cindy: d2 a ha se co. e h2 12 s6 SX. SK

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I'm developing a card game that requires one deck of 52 cards using Java as shown in the image below:

Baba : CA C7 d7 d8 d9, CK C3 dA C6 d4, c4 s3 hA hx dk, dQ
Cindy: h3 d5 d3 są c9, d2 s8 h8 s9 cQ, cJ h2 s2 s6 sx, SK
Score:
Baba = 20
Cindy = 74
Press ENTER to next round.
Available Cards:
Baba : h4 d6 c5 55 h9, CA C7 d7 d8 d9, CK c3 dA
Cindy: s4 h5 dj s7 SA, h3 d5 d3 sQ c9, d2 s8 h8 s9 cQ, CJ h2 s2 s6 Sx, sK
d4
c4 53 hA hx dK, dQ
*** ROUND 3 ***
Cards at Hand:
Baba : CA c7 d7 d8 d9 Point = 24 | win
Cindy: c9 d3 d5 h3 sQ | Point = 10
Press ENTER to next round.
Score:
*** ROUND 2 ***
Cards at Hand:
Baba = 57
Cindy = 74
Baba : c5 d6 h4 h9 s5 | Point = 13 | win
Cindy: d) h5 SA 54 57 | Point = 12
Available Cards:
Baba : CK c3 dA C6 d4, c4 s3 hA hx dk, dQ
Cindy: d2 s8 h8 s9 cQ, c) h2 s2 s6 sx, SK
Score:
Baba = 33
Cindy = 74
Press ENTER to next round.
Available Cards:
Page 4 of 7
Baba : CA c7 d7 d8 d9, CK C3 dA Cc6 d4, c4 s3 hA hx dK, dQ
Cindy: h3 d5 d3 sQ c9, d2 s8 h8 s9 cQ, cJ h2 s2 s6 sx, SK
Press ENTER to next round.
*** ROUND 3 ***
Cards at Hand:
Baba : CA C7 d7 d8 d9 | Point = 24 | win
Cindy: c9 d3 d5 h3 sQ | Point - 10
Score:
Baba = 57
*** ROUND 4 ***
Cindy = 74
Cards at Hand:
Baba : c3 c6 CK dA d4 Point = 19 win
Cindy: cQ d2 h8 s8 s9
Available Cards:
Point = 17
Baba : CK c3 dA C6 d4, c4 s3 hA hx dk, dQ
Cindy: d2 s8 h8 s9 cQ, c) h2 s2 s6 sx, SK
Score:
= 76
Cindy = 74
Baba
Press ENTER to next round.
Page 4 of 7
Available Cards:
Baba : C4 s3 hA hx dk, d.
Cindy: cJ h2 s2 s6 sx, SK
....* Baba is the WINNER! •.***
2.3 Class Design
Your program shall have the following 3 classes at minimum:
1) Game - A game has players and cards.
2) Player - A player has cards.
3) Card
You may add classes to support inheritance, association, aggregation, composition, or any significant
features.
*** ROUND 4 ***
Cards at Hand:
Baba : c3 c6 CK dA d4 | Point = 19 | win
Cindy: cQ d2 h8 s8 s9| Point = 17
Score:
2.4 Data Structures
Baba
= 76
Cindy = 74
You program should use more than array and array list. Consider whether stack, queue, set, and/or
map could be used.
Available Cards:
Transcribed Image Text:Baba : CA C7 d7 d8 d9, CK C3 dA C6 d4, c4 s3 hA hx dk, dQ Cindy: h3 d5 d3 są c9, d2 s8 h8 s9 cQ, cJ h2 s2 s6 sx, SK Score: Baba = 20 Cindy = 74 Press ENTER to next round. Available Cards: Baba : h4 d6 c5 55 h9, CA C7 d7 d8 d9, CK c3 dA Cindy: s4 h5 dj s7 SA, h3 d5 d3 sQ c9, d2 s8 h8 s9 cQ, CJ h2 s2 s6 Sx, sK d4 c4 53 hA hx dK, dQ *** ROUND 3 *** Cards at Hand: Baba : CA c7 d7 d8 d9 Point = 24 | win Cindy: c9 d3 d5 h3 sQ | Point = 10 Press ENTER to next round. Score: *** ROUND 2 *** Cards at Hand: Baba = 57 Cindy = 74 Baba : c5 d6 h4 h9 s5 | Point = 13 | win Cindy: d) h5 SA 54 57 | Point = 12 Available Cards: Baba : CK c3 dA C6 d4, c4 s3 hA hx dk, dQ Cindy: d2 s8 h8 s9 cQ, c) h2 s2 s6 sx, SK Score: Baba = 33 Cindy = 74 Press ENTER to next round. Available Cards: Page 4 of 7 Baba : CA c7 d7 d8 d9, CK C3 dA Cc6 d4, c4 s3 hA hx dK, dQ Cindy: h3 d5 d3 sQ c9, d2 s8 h8 s9 cQ, cJ h2 s2 s6 sx, SK Press ENTER to next round. *** ROUND 3 *** Cards at Hand: Baba : CA C7 d7 d8 d9 | Point = 24 | win Cindy: c9 d3 d5 h3 sQ | Point - 10 Score: Baba = 57 *** ROUND 4 *** Cindy = 74 Cards at Hand: Baba : c3 c6 CK dA d4 Point = 19 win Cindy: cQ d2 h8 s8 s9 Available Cards: Point = 17 Baba : CK c3 dA C6 d4, c4 s3 hA hx dk, dQ Cindy: d2 s8 h8 s9 cQ, c) h2 s2 s6 sx, SK Score: = 76 Cindy = 74 Baba Press ENTER to next round. Page 4 of 7 Available Cards: Baba : C4 s3 hA hx dk, d. Cindy: cJ h2 s2 s6 sx, SK ....* Baba is the WINNER! •.*** 2.3 Class Design Your program shall have the following 3 classes at minimum: 1) Game - A game has players and cards. 2) Player - A player has cards. 3) Card You may add classes to support inheritance, association, aggregation, composition, or any significant features. *** ROUND 4 *** Cards at Hand: Baba : c3 c6 CK dA d4 | Point = 19 | win Cindy: cQ d2 h8 s8 s9| Point = 17 Score: 2.4 Data Structures Baba = 76 Cindy = 74 You program should use more than array and array list. Consider whether stack, queue, set, and/or map could be used. Available Cards:
*** ROUND 2 ***
In each round, players are each dealt 5 cards. As shown in the sample run, Ali receives the 5
cards in the following order
Ali: c5 s6 SK da CK
5.
2. TASKS
Cards at Hand:
Ali : d8 dJ h3 h5 s7 | Point = 18
Baba : d3 d5 h2 h8 s3 | Point = 10
Cindy: c8 cJ h9 họ sQ | Point = 19 | win
You are developing a card game that requires one deck of 52 cards as shown below:
The program shall sort the cards by suit then face.
Ali: c5 CK dA 56 SK
6.
In each round, the player with the highest point wins that round. If there is a tie, both players
win.
7. The point is chosen from the suit that gives the highest point (study the sample run).
8. At the end of the game, the player with the highest score is declared the winner.
Score:
Ali
Baba
= 0
Cindy = 48
Available Cards:
Ali : cx c2 h4 hA d2, hJ hx s2
Baba : c9 hK d6 sJ sx, s8 d7
Cindy: dk c6 s9 s4 c7, s5 c3
2.2 Sample run
To make testing easier and save time during interview, your program shall never clear screen.
中中:
******************
* 3-Player Phase *
*** ROUND 3 ***
Cards at Hand:
Ali : c2 cx d2 hA h4
Baba : c9 d6 hk sx sJ
Cindy: c6 c7 dk s4 s9
******************
Enter player 1 name: Ali
Enter player 2 name: Baba
Enter player 3 name: Cindy
Point = 12
Point - 20 I win
Point = 13
Available Cards:
Ali : c5 s6 Sk dA CK, h5 h3 dJ d8 s7, cx c2 h4 hA d2, hJ hx s2
Baba : d4 h7 c4 cQ SA, d5 s3 d3 h2 h8, c9 hk d6 sJ Sx, s8 d7
Cindy: CA dx h6 do d9, c8 h9 họ sQ cJ, dk c6 s9 s4 c7, 55 c3
Photo Credit: Mannaggia / Fotolia
Score:
Ali
= 0
Baba
= 20
The 52 card has 4 suits from top to bottom: diamonds (d), clubs (c), hearts (h), and spades (s). Each
card has a point as shown in the table below.
Cindy = 48
Press s to Shuffle or ENTER to start.
<Enter is pressed>
Available Cards:
Ali : hJ hx s2
Baba : s8 d7
Cindy: 55 c3
*** ROUND 1 ***
Cards at Hand:
***** Baba and Cindy proceed to 2-Player phase *****
Ali : c5 CK dA S6 SK | Point = 16
Baba : c4 cQ d4 h7 SA | Point = 14
Cindy: CA d9 dx dQ h6 | Point = 29 | win
Page 1 of 7
* 2-Player Phase
幸 幸
Page 2 of 7
Available cards:
Page 3 of 7
Face
Point
Ace/A
2-9
Score:
Ali
Follow the face
10/X
10
Baba
Jack/I
10
Queen/o 10
|10
Cindy = 29
Baba : họ dx h7 c2 cx, h4 d6 c5 s5 h9, CA C7 d7 d8 d9, CK c3 dA C6 d4,
с4 53 hА hx dк, do
Cindy: h6 hJ C8 SJ hk, s4 h5 dJ s7 SA, h3 d5 d3 sQ c9, d2 s8 h8 s9 cQ,
Available Cards:
Ali : h5 h3 dJ d8 s7, cx c2 h4 hA d2, hJ hx s2
Baba : d5 s3 d3 h2 h8, c9 hk d6 sJ sx, s8 d7
Cindy: c8 h9 họ sQ cJ, dk C6 s9 s4 c7, 55 c3
King/K
C) h2 s2 s6 sx, SK
2.1 Game Rules
Press s to Shuffle or ENTER to start.
1. The game has two (2) phases: 3 Players, and 2 Players.
2. The game begins with the 3 Players phase. Three (3) rounds are played in the 3 Players phase.
The top 2 players with the highest score proceed to the 2 Players phase. Four (4) rounds are
played in the 2 Players phase.
3. At the end of the 2 Players phase, the player with the highest score wins the game.
Press ENTER to next round.
*** ROUND 1 ***
Cards at Hand:
Baba : c2 cCx dx h7 ho| Point = 17
Cindy: c8 h6 hJ hk sJ | Point = 26 | win
*** ROUND 2 ***
4. The 52 cards are shuffled and can be re-shuffled
the beginning of each phase in the game.
cards at Hand:
8.27 x 11.69 in
5. In each round, players are each dealt 5 cards. As shown in the sample run, Ali receives the 5
cards in the following order
Ali : d8 dJ h3 h5 s7 | Point = 18
Baba : d3 d5 h2 h8 s3 | Point = 10
Score:
Transcribed Image Text:*** ROUND 2 *** In each round, players are each dealt 5 cards. As shown in the sample run, Ali receives the 5 cards in the following order Ali: c5 s6 SK da CK 5. 2. TASKS Cards at Hand: Ali : d8 dJ h3 h5 s7 | Point = 18 Baba : d3 d5 h2 h8 s3 | Point = 10 Cindy: c8 cJ h9 họ sQ | Point = 19 | win You are developing a card game that requires one deck of 52 cards as shown below: The program shall sort the cards by suit then face. Ali: c5 CK dA 56 SK 6. In each round, the player with the highest point wins that round. If there is a tie, both players win. 7. The point is chosen from the suit that gives the highest point (study the sample run). 8. At the end of the game, the player with the highest score is declared the winner. Score: Ali Baba = 0 Cindy = 48 Available Cards: Ali : cx c2 h4 hA d2, hJ hx s2 Baba : c9 hK d6 sJ sx, s8 d7 Cindy: dk c6 s9 s4 c7, s5 c3 2.2 Sample run To make testing easier and save time during interview, your program shall never clear screen. 中中: ****************** * 3-Player Phase * *** ROUND 3 *** Cards at Hand: Ali : c2 cx d2 hA h4 Baba : c9 d6 hk sx sJ Cindy: c6 c7 dk s4 s9 ****************** Enter player 1 name: Ali Enter player 2 name: Baba Enter player 3 name: Cindy Point = 12 Point - 20 I win Point = 13 Available Cards: Ali : c5 s6 Sk dA CK, h5 h3 dJ d8 s7, cx c2 h4 hA d2, hJ hx s2 Baba : d4 h7 c4 cQ SA, d5 s3 d3 h2 h8, c9 hk d6 sJ Sx, s8 d7 Cindy: CA dx h6 do d9, c8 h9 họ sQ cJ, dk c6 s9 s4 c7, 55 c3 Photo Credit: Mannaggia / Fotolia Score: Ali = 0 Baba = 20 The 52 card has 4 suits from top to bottom: diamonds (d), clubs (c), hearts (h), and spades (s). Each card has a point as shown in the table below. Cindy = 48 Press s to Shuffle or ENTER to start. <Enter is pressed> Available Cards: Ali : hJ hx s2 Baba : s8 d7 Cindy: 55 c3 *** ROUND 1 *** Cards at Hand: ***** Baba and Cindy proceed to 2-Player phase ***** Ali : c5 CK dA S6 SK | Point = 16 Baba : c4 cQ d4 h7 SA | Point = 14 Cindy: CA d9 dx dQ h6 | Point = 29 | win Page 1 of 7 * 2-Player Phase 幸 幸 Page 2 of 7 Available cards: Page 3 of 7 Face Point Ace/A 2-9 Score: Ali Follow the face 10/X 10 Baba Jack/I 10 Queen/o 10 |10 Cindy = 29 Baba : họ dx h7 c2 cx, h4 d6 c5 s5 h9, CA C7 d7 d8 d9, CK c3 dA C6 d4, с4 53 hА hx dк, do Cindy: h6 hJ C8 SJ hk, s4 h5 dJ s7 SA, h3 d5 d3 sQ c9, d2 s8 h8 s9 cQ, Available Cards: Ali : h5 h3 dJ d8 s7, cx c2 h4 hA d2, hJ hx s2 Baba : d5 s3 d3 h2 h8, c9 hk d6 sJ sx, s8 d7 Cindy: c8 h9 họ sQ cJ, dk C6 s9 s4 c7, 55 c3 King/K C) h2 s2 s6 sx, SK 2.1 Game Rules Press s to Shuffle or ENTER to start. 1. The game has two (2) phases: 3 Players, and 2 Players. 2. The game begins with the 3 Players phase. Three (3) rounds are played in the 3 Players phase. The top 2 players with the highest score proceed to the 2 Players phase. Four (4) rounds are played in the 2 Players phase. 3. At the end of the 2 Players phase, the player with the highest score wins the game. Press ENTER to next round. *** ROUND 1 *** Cards at Hand: Baba : c2 cCx dx h7 ho| Point = 17 Cindy: c8 h6 hJ hk sJ | Point = 26 | win *** ROUND 2 *** 4. The 52 cards are shuffled and can be re-shuffled the beginning of each phase in the game. cards at Hand: 8.27 x 11.69 in 5. In each round, players are each dealt 5 cards. As shown in the sample run, Ali receives the 5 cards in the following order Ali : d8 dJ h3 h5 s7 | Point = 18 Baba : d3 d5 h2 h8 s3 | Point = 10 Score:
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Files and Directory
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education