Question: You will combine all files into a single file. The Deck and Card class will be included in the main program. You will not have

You will combine all files into a single file. The Deck and Card class will be included in the main
program. You will not have any #ifndef/#define/#edif statements. You will NOT have header files.
You will us a vector to store your cards.
What to submit:
Submit 1 source file: war.cpp.
2 screenshots:
The first part of the program which shows the player names and number of games as well as
the unshuffled and shuffled deck.
The point where the program raised and handled the exception along with the final screen
showing the statistics.When you run your program the following will happen in this order:
A new deck will be created.
The program will ask for the names of the 2 players.
The program will ask how many games you want to play. (new for Prog 2)
The unshuffled deck will be displayed on the screen.
The deck will be shuffled.
The shuffled deck will display on the screen.
The number of games selected in step 3 will be played, announcing the winner of each game. Ties are
possible as well.
After all games are played the program will print the statistics.
Things to consider:
You will raise an exception in the Deck::deal() function to if the deck is empty
You will catch the exception in the main function
You DO NOT need a default Card constructor since you are using an array
You will combine all files into a single file.

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 Programming Questions!