Tech Support Guy banner
Status
Not open for further replies.

FOR ALL C++ PROGRAMMERS......

1K views 1 reply 2 participants last post by  YSB 
#1 ·
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.
 
See less See more
#2 ·
Um... are you asking us to write the program for you? To be perfectly honest, the only way to learn programming is to do it. If we do your assignments for you it would be counterproductive. The better idea would be for you to post the finished product here and we can give you tips and pointers on what you already did. The first step though is you must complete the program yourself and get it working. once you've done that we can help you improve your technique.

Good Luck! :)
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top