Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

More Books

Students also viewed these Databases questions