Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How can I break the following program up into a header, implementation, and main files? I'm confused on how it works with the classes #include
How can I break the following program up into a header, implementation, and main files? I'm confused on how it works with the classes
#include#include #include using namespace std; class Deck { public: //c = draw number from 1 to 13 // 1 = Ace , 2 to 10 numbers,11 to 13 = J,Q,K int c; //v = draw card suit //1 = Spades //2 = Hearts //3 = Clubs //4 = Diamonds int v; void draw() { //generate randomly c and v c = rand()%13 + 1; v = rand()%4 + 1; //print respective result if(c == 1) { cout<<"Ace "; } else if(c == 11) { cout<<"Jack "; } else if(c == 12) { cout<<"Queen "; } else if(c == 13) { cout<<"King "; } else { cout<
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started