Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This homework is not for the grade, but failure to submit a solution by the deadline will cause a grade deduction in your next homework.

This homework is not for the grade, but failure to submit a solution by the deadline will cause a grade deduction in your next homework.
In this assignment, you will write a C++ program that receives a part shuffled deck of playing cards and will sort them in a 2-dimensional array. Columns are in order of spades, hearts, clubs, and diamonds. Rows are 1 to 10, then Jacks, Queens, and Kings. This is a good practice to dust of your C++ skills.
INPUT:
The input file contains a string listing some of the card's numbers and the first letter of its suit. Kings will be noted as K, queens as Q, and jacks as J. Each card is separated from the next one with ", "and you can assume all the inputs are in the correct form. See the example below as a valid entry:
QS,8D,4D,1S,10C, KH
(Queen of Spades),(8 of Diamonds),(4 of Diamonds),(Ace of Spades),(10 of Clubs),(king of Hearts)
OUTPUT:
You will return a file containing a string, your 2D array printed. For empty spaces, you will return 0, and for the known cards, 1. See the example below:
1000
0000
0000
0001
0000
0000
0000
0001
0000
0100
0000
1000
0010

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

=+Will he buy the insurance? .

Answered: 1 week ago

Question

Show the properties and structure of allotropes of carbon.

Answered: 1 week ago