Question
So I need help with this program. Thank you for your help and please read and follow the directions. PLEASE COMMENT THE CODE so I
So I need help with this program. Thank you for your help and please read and follow the directions. PLEASE COMMENT THE CODE so I can follow whats going on. Incorporate the template code I provided, please. Which means don't just write the missing parts down and have me confused where they belong. If I don't see these simple directions met, I will flag this as incomplete. If you did all that I ask, then I will, of course, give a good rating! I already had asked this question, but the answer did do all the things I asked for, like comments and the use of template code, so I was lost. Please don't do the same. Please be very organized and easy to follow, Thanks! If it takes you a bit of time, no rush, but please just make sure this is a quality answer and not make me ask about this a third time. Please be sure to comment and explain the "**" part as I am especially confused about that part. Thank you for your valuable time and help.
Here is the directions given to us. The two executables take two optional arguments:-seed-N where N is a non- negative integer for seeding the random number generator, and-verbose causes the random_card() function to print each card to stdout before returning it to the calling function. Make hw1a.cpp Generate suit cards randomly until all face cards of a suit type has been generated. Next print a table showing how many cards of each suit and rank you were dealt along the way. Flag the suit that caused termination by adding"*" at the end its output line. The first step is to work on how to parse the String representing a card into suit and rank and translate those into the indices for the corresponding global string arrays. That is, reverse engineer what the random_card() function does. Caveat: Do not simply use integer division to reverse the modulo arithmetic, instead use string comparisons. Test the code by temporarily printing the suit and rank indices to stdout Break out of the loop after some small number of iterations. The next step is to add a table that keeps track of which cards you are dealt (counts of suit and rank pairs). Implement this table using a static two-dimensional whose content you initialize to zero before entering the while loop. The table should have 4 rows and 13 columns corresponding to the fixed number of suits and the number of ranks, respectively Lastly, replace the finite number of iterations termination criterion with the one requested which is based on all face cards having been seen for a given suit. That is, step thru the table for each suit and set aStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started