Create a program for decision structure , C/C++ Programming

Create the following program or propose one of your own. The program must include at least one of each of the following.

  • Decision structure
  • Repetitive structure
  • function
  • array
  • Class and it must be used

Create a class for a deck of cards. Decide what attributes and methods you will need.

HINT: Think about the characteristics of a deck of cards and what you can do with it. Also, see if there are any built-in or library functions that will help.

Write a program using the class. The program needs to provide a menu to the user with the following options:

1. Reset the deck

2. Shuffle the deck

3. Cut the deck

4. Cut to a card.

5. Cut against the computer

6. Exit

Each of these options must work.

  1. To clarify the menu options, reset the deck would put the deck back to default state.      
  2. Shuffle the deck should do as described; shuffle the cards to a random order.                          
  3. Cut the deck would be flipping the deck so that the bottom half is on top.                              
  4. Cutting to a card is when you cut the deck at a random point and draw the card at that point.
  5. Cutting against somebody is when two people cut to a card and the one with the highest card is the winner.                                                                                                        
  6. When cutting against the computer you should allow the user some input to pick their card such as entering a number in a certain range. You can select the computer's randomly.
Posted Date: 3/8/2013 1:32:53 AM | Location : United States







Related Discussions:- Create a program for decision structure , Assignment Help, Ask Question on Create a program for decision structure , Get Answer, Expert's Help, Create a program for decision structure Discussions

Write discussion on Create a program for decision structure
Your posts are moderated
Related Questions
Program is to swap the two values which are enter by user: Program is to swap the two values which are enter by user through the function with values changed using pointers

Templates permit to create generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types. Until

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

C Program to check PRIME NUMBERS   main() {           int i,k,r,flag;           clrscr();           printf("ENTER THE NO. TO CHECK IT IS PRIME OR NOT: ");

It is a pointer accessible only in the member functions of a struct, class or union type. It points to the object for which the member function is called. Static member functions d

real time application of b tree

6999066263304447777077766622337778 -----> message sent by the first smuggler. my name is robert---------> message decoded by the second smuggler. Where ‘0’ denotes the "space".

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

how to create a shopping cart