Question: I am currently writing a program in C + + and need help with the following: Part A - 1 : Loading Cards Add a

I am currently writing a program in C++ and need help with the following:
Part A -1: Loading Cards
Add a static LoadCards method to the WarGame class.Declare your method in the WarGame.h file and define the method in the WarGame.cpp file.
It should have a string parameter for the file path.In the method, it should read the cards.csv file and split the data to get the suits and faces.
Use them to create 52 unique cards and store each card in the _cards vector field of the class.
NAME RETURNS PARAMETERS
LoadCards nothing string
Call the LoadCards method from the WarGame constructor.
Part A -2 : Showing Cards
Add a static ShowCards method to the WarGame class.Declare your method in the WarGame.h file and define the method in the WarGame.cpp file.
Loop over the vector and call the Print method on each card.Make sure each card appears on a new line.
NAME RETURNS PARAMETERS
ShowCards nothing none
In case 1 of the menu, call the ShowCards method from main(which is in the CardWars.cpp file).
Part A -3: HighScore class
Add a HighScore class with a name field and a score field both with getter / setter methods.
Add a constructor that takes a name and score.
Part A -4 : Player class
Add a Player class with a name field, a score field, a pile field which is a vector of cards, and a won field which is a vector of cards.Add getter / setter methods for the score and name fields.
Add the following methods : HasCards, PushCard, PopCard, and WonCards.
HasCards will return true if there are cards in the pile vector.
PushCard will take a card parameter and add it to the pile vector of cards.
PopCard will remove a card from the pile vector of cards and return the card.
WonCards will take a vector of cards and add it to the won vector of cards and update the score field.

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!