hi, i need a solution to this program. i sort of completed most of it, but i would like to know if there is an easier way to do it. if anyone can help, i would really appreciate it. Thanks... here it is:
Description: The program will print an unshuffled deck according to the order of spades, hearts, diamonds, and clubs with decrementing order. the program will randomly shuffle a deck and print out the new order of 52 cards.
Input: ask user to shuffle deck. if answer is no, program is terminated.
Output: start program that shows the original deck order. if input is yes, then program prints shuffled deck.
Suggestion: this program consists of 3 files: head file, definition of member functions file, and main file.
1. define the enum data type with four suits:enum suit {spades, hearts, diamonds, clubs}
2. declare a desk class w/data members:suit and total cards as integer.
3. set up member functions: initDeck, printOriginal, shuffleDeck, and printShuffled.
4. include time.h for randomize function and shuffling by int k = rand() % 52.
Description: The program will print an unshuffled deck according to the order of spades, hearts, diamonds, and clubs with decrementing order. the program will randomly shuffle a deck and print out the new order of 52 cards.
Input: ask user to shuffle deck. if answer is no, program is terminated.
Output: start program that shows the original deck order. if input is yes, then program prints shuffled deck.
Suggestion: this program consists of 3 files: head file, definition of member functions file, and main file.
1. define the enum data type with four suits:enum suit {spades, hearts, diamonds, clubs}
2. declare a desk class w/data members:suit and total cards as integer.
3. set up member functions: initDeck, printOriginal, shuffleDeck, and printShuffled.
4. include time.h for randomize function and shuffling by int k = rand() % 52.