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

Assignment Help:

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.

Related Discussions:- Create a program for decision structure

How the compiler arranges the several sections , Q: How the compiler arrang...

Q: How the compiler arranges the several sections in the executable image? A: The executable contained following sections: 1.      Data Section (initialized data variable sec

Illustration of plot function, Illustration of Plot function: To be mo...

Illustration of Plot function: To be more common, the script could prompt the user for the time and temperature, instead of just assigning the values. Then, the axis function

Stack over flow for sun sparc, Please use C or C++ to write your programs. ...

Please use C or C++ to write your programs. Our homework will focus on SUN sparc machines because to exploit x86 stack-overflow is too easy. This is not just a programming assignme

Add words in dictionary - c++ program, Add words in Dictionary: void D...

Add words in Dictionary: void Dictionary::add( Object& objectToAdd ) {     if( !objectToAdd.isAssociation() )         ClassLib_error( __ENOTASSOC );     else

.testvita, answer for tcs is working question

answer for tcs is working question

Define some important point for bit fields with structures, Define some Imp...

Define some Important Point for bit fields with structures? Only n lower bits will be assigned to an n bit number thus type cannot take values larger than 15 (4 bits long)

Define namespace in c++, It is a feature in C++ to reduce name collisions i...

It is a feature in C++ to reduce name collisions in the global name space. This namespace keyword assigns a separate name to a library that allows other libraries to use the simila

Nonlinear least squares minimization, Estimation of the yield curve using n...

Estimation of the yield curve using nonlinear least squares minimization: The last part of this assignment asks you to construct the Nelson Siegel yield curve from observed bond pr

Algorithm, write a pseudo code for computing sin(x) using sentinel control ...

write a pseudo code for computing sin(x) using sentinel control loop

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd