Question: Write the Card class in file card.cpp as shown to the right, with a regression test in file test.cpp. 1 If the Card constructors Suit

Write the Card class in file card.cpp as shown to the right, with a regression test in file test.cpp. 1 If the Card constructors Suit or Rank parameter is invalid, throw a runtime_error.

 Write the Card class in file card.cpp as shown to the

Write the Deck class in file deck.cpp as shown to the right, with a regression test in file decktest.cpp. If Deck::deal is called when the deck is empty, throw a Deck_empty exception. Write an application in file main.cpp that instances and prints out a deck of 20 random cards (you do NOT need to ensure that each card is unique

\)

Deck:Deck empty I exception Deck Card enum Suit -suit:Suit Card suit):Suit card to stringl: string -deck: vectors Card Deck(cards: int-10)rank: Rank + deal): Card suit/U Card(suit: Suit, rank: Rank) +rank): Rank edatatype Rank rank

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!