The names of the cards are stored in a text string will be converted into an array. The array will be randomly sorted to "shuffle" the deck.  Each time the user clicks a Deal button, the last five cards of the array will be removed, reducing the size of the deck size. When the size of the deck drops to zero, a new randomly sorted deck will be generated. A preview of the completed project with a randomly generated hand is shown in Figure 7-50.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter6: Using Arrays
Section: Chapter Questions
Problem 10E
icon
Related questions
Question

In this project you will generate a poker hand containing five cards randomly selected from a deck of cards. The names of the cards are stored in a text string will be converted into an array. The array will be randomly sorted to "shuffle" the deck.  Each time the user clicks a Deal button, the last five cards of the array will be removed, reducing the size of the deck size. When the size of the deck drops to zero, a new randomly sorted deck will be generated. A preview of the completed project with a randomly generated hand is shown in Figure 7-50.

Hands-On Project 7-2
The names of the cards are stored in a text string that will have to be converted into an array. The array will be
In this project you will generate a poker hand containing five cards randomly selected from a deck of cards.
removed, reducing the size of the deck size. When the size of the deck drops to zero, a new randomly sorted deck
randomly sorted to "shuffle" the deck. Each time the user clicks a Deal button, the last five cards of the array will be
will be generated. A preview of the completed project with a randomly generated hand is shown in Figure 7-50.
5 of
Diamonds
Hands-on Project 7-2
Poker Hand
Queeen of
Hearts
P
E-X 1551014 no
15ey well
Figure 7-50 Completed Project 7-2
8 of Clubs
HANDS-ON PROJECTS
DEAL
Ace of Clubs
1334 4 of
Diamonds
303
10
T
Cards left in the current deck: 16
161
Do the following:
1. Use your code editor to open the project07-02_txt.html and project07-02_txt.js files from the js07
project02 folder. Enter your name and the date in the comment section of each file and save them as
project07-02.html and project07-02.js, respectively.
2. Go to the project07-02.html file in your code editor and link the page to the project07-02.js file, deferring the
script from loading until after the page loads. Save your changes to the file.
Go to the project07-02.js file in your code editor. Within the onclick event hander, add the commands
docerib
Transcribed Image Text:Hands-On Project 7-2 The names of the cards are stored in a text string that will have to be converted into an array. The array will be In this project you will generate a poker hand containing five cards randomly selected from a deck of cards. removed, reducing the size of the deck size. When the size of the deck drops to zero, a new randomly sorted deck randomly sorted to "shuffle" the deck. Each time the user clicks a Deal button, the last five cards of the array will be will be generated. A preview of the completed project with a randomly generated hand is shown in Figure 7-50. 5 of Diamonds Hands-on Project 7-2 Poker Hand Queeen of Hearts P E-X 1551014 no 15ey well Figure 7-50 Completed Project 7-2 8 of Clubs HANDS-ON PROJECTS DEAL Ace of Clubs 1334 4 of Diamonds 303 10 T Cards left in the current deck: 16 161 Do the following: 1. Use your code editor to open the project07-02_txt.html and project07-02_txt.js files from the js07 project02 folder. Enter your name and the date in the comment section of each file and save them as project07-02.html and project07-02.js, respectively. 2. Go to the project07-02.html file in your code editor and link the page to the project07-02.js file, deferring the script from loading until after the page loads. Save your changes to the file. Go to the project07-02.js file in your code editor. Within the onclick event hander, add the commands docerib
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

I need javascript, not C#

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Running Time of Application
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning