Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone please program this in C++? 4.10 Assignment Part 1: Deck of Cards In this lab you will write a program that will list

image text in transcribedimage text in transcribed

Can someone please program this in C++?

4.10 Assignment Part 1: Deck of Cards In this lab you will write a program that will list certain cards from a standard deck of playing cards. The program should begin by prompting the user for a "match word' and reading in that choice. If the match word is ".", the program should print out the names of all 52 cards from the deck Suits listed in this order. Clubs, Hearts, Spades, Diamonds. Ranks within each suit:Ace, Two, Three,.., Nine, Ten, Jack, Queen, King If the match word is the name of a suit or the name of a rank then the program should output only the names of cards that match For example, if the user entered "Queen", then just the four queens would be listed. If the user entered "Clubs", then just the thirteen club cards would be listed. If the word entered by the user matches neither suit nor rank, the program should report "(no matches)". The list of cards should start and end with a "line" of 20 dashes. Here is the output of some sample runs Enter match word for match all): Jack Jack of clubs Jack of Hearts Jack of Spades Jack of Diamonds Enter match word "..for match all): Three Three of Clubs Three of Hearts Three of Spades Three of Diamonds Enter match word ('.' for match all): Spades Ace of Spades wo of Spades Three of Spades Four of Spades Five of Spades Six of Spades Seven of Spades Eight of Spades Nine of Spades Ten of Spades Jack of Spades ueen of Spades King of Spades Enter match word ('' for match al1): Sworda (no matches) Enter match word('.' for match all):. Ace of Clubs Two of Clubs Three of Clubs Four of Clubs Five of Clubs Nine of Diamonds Ten of Diamonds Jack of Diamonds Queen of Diamonds King of Diamonds Ii In this last example, all 52 cards will be listed. It's been shortened here for brevity

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

Step: 3

blur-text-image

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

Mastering Influxdb Database A Comprehensive Guide To Learn Influxdb Database

Authors: Cybellium Ltd ,Kris Hermans

1st Edition

B0CNGGWL7B, 979-8867766450

More Books

Students also viewed these Databases questions