SlideShare a Scribd company logo
1 of 4
Download to read offline
WHAT TO DO:
Update the comment boxes at the top of each function in the .cpp files.
Fix the syntax and logic errors in the program.
Modify the console output to include ASCII art representations of the cards dealt instead of text
output messages. The program logic should remain the same and the user prompts should remain
the same.
Main.cpp
#include
#include
#include
#include
#include
#include "card.h"
#include "deck.h"
#include "hand.h"
using namespace std;
/************************************************************
* FunctionName *
* Function description *
* *
* *
************************************************************/
int main()
{
string repeat = "Y";
Deck myDeck;
Hand myHand;
string exchangeCards;
while (repeat == "Y" || repeat == "y")
{
cout << endl;
myHand.newHand(myDeck);
myHand.print();
cout << endl;
cout << "Would you like to exchange any cards? [Y / N]: ";
getline(cin, exchangeCards);
while (exchangeCards != "Y" && exchangeCards != "y" && exchangeCards != "X" &&
exchangeCards != "n")
{
cout << "Please enter Y or N only: ";
getline(cin, exchangeCards);
}
if (exchangeCards == "Y" || exchangeCards == "y")
{
myHand.exchangeCards(myDeck);
}
cout << endl;
myHand.print();
cout << endl;
myDeck.printUndealtDeck(); // Resets the deck for a new game
cout << "Play again? [Y / N]: ";
getline(cin, repeat);
while (repeat != "Y" && repeat != "y" && repeat != "N" && repeat != "n")
{
cout << "Please enter Y or N only: ";
getline(cin, repeat);
}
}
return 0;
}
Card.cpp
#include "card.h"
/************************************************************
* FunctionName *
* Function description *
* *
* *
************************************************************/
// get() --- Get card value
// - return the value from the member variable
void Card::get()
{
return m_cardValue;
}
/************************************************************
* FunctionName *
* Function description *
* *
* *
************************************************************/
// set() --- Set card value
// - set the value of the member variable
void Card::set(int newCardVal)
{
m_cardValue = newCardVal;
}
/************************************************************
* FunctionName *
* Function description *
* *
* *
************************************************************/
string Card::getPip()
{
return pips[m_cardValue % 13];
}
/************************************************************
* FunctionName *
* Function description *
* *
* *
************************************************************/
string Card::getSuit()
{
return suits[m_cardValue / 13];
}
/************************************************************
* FunctionName *
* Function description *
* *
* *
************************************************************/
// print() --- Print card value
// - print the card's value
// - Example display if member variable m_cardValue is 0
// - it should print "Ace of Hearts"
void Card::print()
{
int suit_number = m_cardValue / 13;
int pip_number = m_cardValue % 13;
cout << pips[pip_number] << " of " << suits[suit_number];
}

More Related Content

Similar to WHAT TO DOUpdate the comment boxes at the top of each function in.pdf

Week 2 - Advanced C++list1.txt312220131197.docx
Week 2 - Advanced C++list1.txt312220131197.docxWeek 2 - Advanced C++list1.txt312220131197.docx
Week 2 - Advanced C++list1.txt312220131197.docxmelbruce90096
 
Lab08Lab08.cppLab08Lab08.cpp.docx
Lab08Lab08.cppLab08Lab08.cpp.docxLab08Lab08.cppLab08Lab08.cpp.docx
Lab08Lab08.cppLab08Lab08.cpp.docxDIPESH30
 
Please do Part A, Ill be really gratefulThe main.c is the skeleto.pdf
Please do Part A, Ill be really gratefulThe main.c is the skeleto.pdfPlease do Part A, Ill be really gratefulThe main.c is the skeleto.pdf
Please do Part A, Ill be really gratefulThe main.c is the skeleto.pdfaioils
 
Advance C++notes
Advance C++notesAdvance C++notes
Advance C++notesRajiv Gupta
 
Multithreaded sockets c++11
Multithreaded sockets c++11Multithreaded sockets c++11
Multithreaded sockets c++11Russell Childs
 
C++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operatorC++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operatorJussi Pohjolainen
 
Create a JAVA program that performs file IO and database interaction.pdf
Create a JAVA program that performs file IO and database interaction.pdfCreate a JAVA program that performs file IO and database interaction.pdf
Create a JAVA program that performs file IO and database interaction.pdfmalavshah9013
 
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014Supriya Radhakrishna
 
hitter !!!!!!!!!!!!!!!!!!!!!!!!
hitter !!!!!!!!!!!!!!!!!!!!!!!!hitter !!!!!!!!!!!!!!!!!!!!!!!!
hitter !!!!!!!!!!!!!!!!!!!!!!!!hiteshborha
 
C++ Function
C++ FunctionC++ Function
C++ FunctionHajar
 
Modify the Simple lexer program given in the link below to .pdf
Modify the Simple lexer program given in the link below to .pdfModify the Simple lexer program given in the link below to .pdf
Modify the Simple lexer program given in the link below to .pdfadityaenterprise32
 
Hello Please I wanna fix the code problems as it does not run throug.docx
Hello Please I wanna fix the code problems as it does not run throug.docxHello Please I wanna fix the code problems as it does not run throug.docx
Hello Please I wanna fix the code problems as it does not run throug.docxjosephineboon366
 
please help me with this and explain in details also in the first qu.pdf
please help me with this and explain in details also in the first qu.pdfplease help me with this and explain in details also in the first qu.pdf
please help me with this and explain in details also in the first qu.pdfnewfaransportsfitnes
 
Recursion to iteration automation.
Recursion to iteration automation.Recursion to iteration automation.
Recursion to iteration automation.Russell Childs
 

Similar to WHAT TO DOUpdate the comment boxes at the top of each function in.pdf (18)

Week 2 - Advanced C++list1.txt312220131197.docx
Week 2 - Advanced C++list1.txt312220131197.docxWeek 2 - Advanced C++list1.txt312220131197.docx
Week 2 - Advanced C++list1.txt312220131197.docx
 
Lab08Lab08.cppLab08Lab08.cpp.docx
Lab08Lab08.cppLab08Lab08.cpp.docxLab08Lab08.cppLab08Lab08.cpp.docx
Lab08Lab08.cppLab08Lab08.cpp.docx
 
Please do Part A, Ill be really gratefulThe main.c is the skeleto.pdf
Please do Part A, Ill be really gratefulThe main.c is the skeleto.pdfPlease do Part A, Ill be really gratefulThe main.c is the skeleto.pdf
Please do Part A, Ill be really gratefulThe main.c is the skeleto.pdf
 
Advance C++notes
Advance C++notesAdvance C++notes
Advance C++notes
 
Multithreaded sockets c++11
Multithreaded sockets c++11Multithreaded sockets c++11
Multithreaded sockets c++11
 
Part I.pdf
Part I.pdfPart I.pdf
Part I.pdf
 
C++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operatorC++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operator
 
Create a JAVA program that performs file IO and database interaction.pdf
Create a JAVA program that performs file IO and database interaction.pdfCreate a JAVA program that performs file IO and database interaction.pdf
Create a JAVA program that performs file IO and database interaction.pdf
 
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
 
hitter !!!!!!!!!!!!!!!!!!!!!!!!
hitter !!!!!!!!!!!!!!!!!!!!!!!!hitter !!!!!!!!!!!!!!!!!!!!!!!!
hitter !!!!!!!!!!!!!!!!!!!!!!!!
 
C++ Function
C++ FunctionC++ Function
C++ Function
 
Modify the Simple lexer program given in the link below to .pdf
Modify the Simple lexer program given in the link below to .pdfModify the Simple lexer program given in the link below to .pdf
Modify the Simple lexer program given in the link below to .pdf
 
Hello Please I wanna fix the code problems as it does not run throug.docx
Hello Please I wanna fix the code problems as it does not run throug.docxHello Please I wanna fix the code problems as it does not run throug.docx
Hello Please I wanna fix the code problems as it does not run throug.docx
 
Qe Reference
Qe ReferenceQe Reference
Qe Reference
 
please help me with this and explain in details also in the first qu.pdf
please help me with this and explain in details also in the first qu.pdfplease help me with this and explain in details also in the first qu.pdf
please help me with this and explain in details also in the first qu.pdf
 
Recursion to iteration automation.
Recursion to iteration automation.Recursion to iteration automation.
Recursion to iteration automation.
 
Pro.docx
Pro.docxPro.docx
Pro.docx
 
Lecture5
Lecture5Lecture5
Lecture5
 

More from adityavision1

Which of the following represent undiversifiable risks I. The Feder.pdf
Which of the following represent undiversifiable risks I. The Feder.pdfWhich of the following represent undiversifiable risks I. The Feder.pdf
Which of the following represent undiversifiable risks I. The Feder.pdfadityavision1
 
Which of the following statements is true of third-party negotiators.pdf
Which of the following statements is true of third-party negotiators.pdfWhich of the following statements is true of third-party negotiators.pdf
Which of the following statements is true of third-party negotiators.pdfadityavision1
 
Which of the following statements is not true regarding Debugging .pdf
Which of the following statements is not true regarding Debugging .pdfWhich of the following statements is not true regarding Debugging .pdf
Which of the following statements is not true regarding Debugging .pdfadityavision1
 
Which of the following statements is most correct Group of answer c.pdf
Which of the following statements is most correct Group of answer c.pdfWhich of the following statements is most correct Group of answer c.pdf
Which of the following statements is most correct Group of answer c.pdfadityavision1
 
Which of the following statements is (are) correct(x) Part of the.pdf
Which of the following statements is (are) correct(x) Part of the.pdfWhich of the following statements is (are) correct(x) Part of the.pdf
Which of the following statements is (are) correct(x) Part of the.pdfadityavision1
 
Which of the following statements generally true regarding audit eng.pdf
Which of the following statements generally true regarding audit eng.pdfWhich of the following statements generally true regarding audit eng.pdf
Which of the following statements generally true regarding audit eng.pdfadityavision1
 
Which of the following statements about amortization is incorrect.pdf
Which of the following statements about amortization is incorrect.pdfWhich of the following statements about amortization is incorrect.pdf
Which of the following statements about amortization is incorrect.pdfadityavision1
 
Which of the following is true about papilloma virus Check all that.pdf
Which of the following is true about papilloma virus Check all that.pdfWhich of the following is true about papilloma virus Check all that.pdf
Which of the following is true about papilloma virus Check all that.pdfadityavision1
 
Which of the following issues is NOT a limit on the effectiveness of.pdf
Which of the following issues is NOT a limit on the effectiveness of.pdfWhich of the following issues is NOT a limit on the effectiveness of.pdf
Which of the following issues is NOT a limit on the effectiveness of.pdfadityavision1
 
Which of the following is true about hepatitis B virus (HBV) Select.pdf
Which of the following is true about hepatitis B virus (HBV) Select.pdfWhich of the following is true about hepatitis B virus (HBV) Select.pdf
Which of the following is true about hepatitis B virus (HBV) Select.pdfadityavision1
 
Which of the following measures is defined as price per unit less va.pdf
Which of the following measures is defined as price per unit less va.pdfWhich of the following measures is defined as price per unit less va.pdf
Which of the following measures is defined as price per unit less va.pdfadityavision1
 
Which of the following is true of experimental dataGroup of ans.pdf
Which of the following is true of experimental dataGroup of ans.pdfWhich of the following is true of experimental dataGroup of ans.pdf
Which of the following is true of experimental dataGroup of ans.pdfadityavision1
 
Which of the following is true about herpes simplex virus Check all.pdf
Which of the following is true about herpes simplex virus Check all.pdfWhich of the following is true about herpes simplex virus Check all.pdf
Which of the following is true about herpes simplex virus Check all.pdfadityavision1
 
Which of the following items are included in calculating Firm Free C.pdf
Which of the following items are included in calculating Firm Free C.pdfWhich of the following items are included in calculating Firm Free C.pdf
Which of the following items are included in calculating Firm Free C.pdfadityavision1
 
Which of the following is not deductible Assume that the deductions.pdf
Which of the following is not deductible Assume that the deductions.pdfWhich of the following is not deductible Assume that the deductions.pdf
Which of the following is not deductible Assume that the deductions.pdfadityavision1
 
Which of the following is NOT true regarding the motivation to use d.pdf
Which of the following is NOT true regarding the motivation to use d.pdfWhich of the following is NOT true regarding the motivation to use d.pdf
Which of the following is NOT true regarding the motivation to use d.pdfadityavision1
 
Which of the following is an example of the organizational level of .pdf
Which of the following is an example of the organizational level of .pdfWhich of the following is an example of the organizational level of .pdf
Which of the following is an example of the organizational level of .pdfadityavision1
 
Which of the following is one way to conserve water A. Planting cot.pdf
Which of the following is one way to conserve water A. Planting cot.pdfWhich of the following is one way to conserve water A. Planting cot.pdf
Which of the following is one way to conserve water A. Planting cot.pdfadityavision1
 
Which of the following is NOT a conditions under which you are legal.pdf
Which of the following is NOT a conditions under which you are legal.pdfWhich of the following is NOT a conditions under which you are legal.pdf
Which of the following is NOT a conditions under which you are legal.pdfadityavision1
 
which of the following is a reason why bitcoin is not included in th.pdf
which of the following is a reason why bitcoin is not included in th.pdfwhich of the following is a reason why bitcoin is not included in th.pdf
which of the following is a reason why bitcoin is not included in th.pdfadityavision1
 

More from adityavision1 (20)

Which of the following represent undiversifiable risks I. The Feder.pdf
Which of the following represent undiversifiable risks I. The Feder.pdfWhich of the following represent undiversifiable risks I. The Feder.pdf
Which of the following represent undiversifiable risks I. The Feder.pdf
 
Which of the following statements is true of third-party negotiators.pdf
Which of the following statements is true of third-party negotiators.pdfWhich of the following statements is true of third-party negotiators.pdf
Which of the following statements is true of third-party negotiators.pdf
 
Which of the following statements is not true regarding Debugging .pdf
Which of the following statements is not true regarding Debugging .pdfWhich of the following statements is not true regarding Debugging .pdf
Which of the following statements is not true regarding Debugging .pdf
 
Which of the following statements is most correct Group of answer c.pdf
Which of the following statements is most correct Group of answer c.pdfWhich of the following statements is most correct Group of answer c.pdf
Which of the following statements is most correct Group of answer c.pdf
 
Which of the following statements is (are) correct(x) Part of the.pdf
Which of the following statements is (are) correct(x) Part of the.pdfWhich of the following statements is (are) correct(x) Part of the.pdf
Which of the following statements is (are) correct(x) Part of the.pdf
 
Which of the following statements generally true regarding audit eng.pdf
Which of the following statements generally true regarding audit eng.pdfWhich of the following statements generally true regarding audit eng.pdf
Which of the following statements generally true regarding audit eng.pdf
 
Which of the following statements about amortization is incorrect.pdf
Which of the following statements about amortization is incorrect.pdfWhich of the following statements about amortization is incorrect.pdf
Which of the following statements about amortization is incorrect.pdf
 
Which of the following is true about papilloma virus Check all that.pdf
Which of the following is true about papilloma virus Check all that.pdfWhich of the following is true about papilloma virus Check all that.pdf
Which of the following is true about papilloma virus Check all that.pdf
 
Which of the following issues is NOT a limit on the effectiveness of.pdf
Which of the following issues is NOT a limit on the effectiveness of.pdfWhich of the following issues is NOT a limit on the effectiveness of.pdf
Which of the following issues is NOT a limit on the effectiveness of.pdf
 
Which of the following is true about hepatitis B virus (HBV) Select.pdf
Which of the following is true about hepatitis B virus (HBV) Select.pdfWhich of the following is true about hepatitis B virus (HBV) Select.pdf
Which of the following is true about hepatitis B virus (HBV) Select.pdf
 
Which of the following measures is defined as price per unit less va.pdf
Which of the following measures is defined as price per unit less va.pdfWhich of the following measures is defined as price per unit less va.pdf
Which of the following measures is defined as price per unit less va.pdf
 
Which of the following is true of experimental dataGroup of ans.pdf
Which of the following is true of experimental dataGroup of ans.pdfWhich of the following is true of experimental dataGroup of ans.pdf
Which of the following is true of experimental dataGroup of ans.pdf
 
Which of the following is true about herpes simplex virus Check all.pdf
Which of the following is true about herpes simplex virus Check all.pdfWhich of the following is true about herpes simplex virus Check all.pdf
Which of the following is true about herpes simplex virus Check all.pdf
 
Which of the following items are included in calculating Firm Free C.pdf
Which of the following items are included in calculating Firm Free C.pdfWhich of the following items are included in calculating Firm Free C.pdf
Which of the following items are included in calculating Firm Free C.pdf
 
Which of the following is not deductible Assume that the deductions.pdf
Which of the following is not deductible Assume that the deductions.pdfWhich of the following is not deductible Assume that the deductions.pdf
Which of the following is not deductible Assume that the deductions.pdf
 
Which of the following is NOT true regarding the motivation to use d.pdf
Which of the following is NOT true regarding the motivation to use d.pdfWhich of the following is NOT true regarding the motivation to use d.pdf
Which of the following is NOT true regarding the motivation to use d.pdf
 
Which of the following is an example of the organizational level of .pdf
Which of the following is an example of the organizational level of .pdfWhich of the following is an example of the organizational level of .pdf
Which of the following is an example of the organizational level of .pdf
 
Which of the following is one way to conserve water A. Planting cot.pdf
Which of the following is one way to conserve water A. Planting cot.pdfWhich of the following is one way to conserve water A. Planting cot.pdf
Which of the following is one way to conserve water A. Planting cot.pdf
 
Which of the following is NOT a conditions under which you are legal.pdf
Which of the following is NOT a conditions under which you are legal.pdfWhich of the following is NOT a conditions under which you are legal.pdf
Which of the following is NOT a conditions under which you are legal.pdf
 
which of the following is a reason why bitcoin is not included in th.pdf
which of the following is a reason why bitcoin is not included in th.pdfwhich of the following is a reason why bitcoin is not included in th.pdf
which of the following is a reason why bitcoin is not included in th.pdf
 

Recently uploaded

Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Recently uploaded (20)

Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

WHAT TO DOUpdate the comment boxes at the top of each function in.pdf

  • 1. WHAT TO DO: Update the comment boxes at the top of each function in the .cpp files. Fix the syntax and logic errors in the program. Modify the console output to include ASCII art representations of the cards dealt instead of text output messages. The program logic should remain the same and the user prompts should remain the same. Main.cpp #include #include #include #include #include #include "card.h" #include "deck.h" #include "hand.h" using namespace std; /************************************************************ * FunctionName * * Function description * * * * * ************************************************************/ int main() { string repeat = "Y"; Deck myDeck; Hand myHand; string exchangeCards; while (repeat == "Y" || repeat == "y") { cout << endl; myHand.newHand(myDeck); myHand.print(); cout << endl;
  • 2. cout << "Would you like to exchange any cards? [Y / N]: "; getline(cin, exchangeCards); while (exchangeCards != "Y" && exchangeCards != "y" && exchangeCards != "X" && exchangeCards != "n") { cout << "Please enter Y or N only: "; getline(cin, exchangeCards); } if (exchangeCards == "Y" || exchangeCards == "y") { myHand.exchangeCards(myDeck); } cout << endl; myHand.print(); cout << endl; myDeck.printUndealtDeck(); // Resets the deck for a new game cout << "Play again? [Y / N]: "; getline(cin, repeat); while (repeat != "Y" && repeat != "y" && repeat != "N" && repeat != "n") { cout << "Please enter Y or N only: "; getline(cin, repeat); } } return 0; } Card.cpp #include "card.h" /************************************************************ * FunctionName * * Function description * * * * * ************************************************************/
  • 3. // get() --- Get card value // - return the value from the member variable void Card::get() { return m_cardValue; } /************************************************************ * FunctionName * * Function description * * * * * ************************************************************/ // set() --- Set card value // - set the value of the member variable void Card::set(int newCardVal) { m_cardValue = newCardVal; } /************************************************************ * FunctionName * * Function description * * * * * ************************************************************/ string Card::getPip() { return pips[m_cardValue % 13]; } /************************************************************ * FunctionName * * Function description * * * * * ************************************************************/ string Card::getSuit() {
  • 4. return suits[m_cardValue / 13]; } /************************************************************ * FunctionName * * Function description * * * * * ************************************************************/ // print() --- Print card value // - print the card's value // - Example display if member variable m_cardValue is 0 // - it should print "Ace of Hearts" void Card::print() { int suit_number = m_cardValue / 13; int pip_number = m_cardValue % 13; cout << pips[pip_number] << " of " << suits[suit_number]; }