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

Introduction of c, Discuss the saleint featuresand application of c

Discuss the saleint featuresand application of c

C program to swap the two values, Program is to swap the two values which a...

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

Need help, how to make basics strong and best logic skills what are the bes...

how to make basics strong and best logic skills what are the best way to be a expert programmer ? what counts a lot knowledge or practice?

CGI, WHAT IS CGI?

WHAT IS CGI?

E^x, Write a program to calculate e^x using the formula: e^x = 1 + x/1! + ...

Write a program to calculate e^x using the formula: e^x = 1 + x/1! + x^2/2! + x^3/3! + ...... Allow the user to enter the integer number x, then do the calculation in a loop (for

CptS 121 Program Development & Design program design in C, Write a program...

Write a program that performs character processing on 10 characters read in from a file, and writes the results to output files. Do NOT use loops or arrays to solve this problem. N

2, how to do 2, 4, 8 associativity

how to do 2, 4, 8 associativity

Random card generator, i need a program that generates this output: The hig...

i need a program that generates this output: The highest card wins! Suit Order is: clubs, diamonds, hearts and spades The computers card is the 5 of Spades. The player’s card is t

Setup and source code with nice user interface, Virtual Webcam effects - Se...

Virtual Webcam effects - Setup and Source code with Nice User Interface Project Description: I want a similar webcam effects application which can apply effects to webcam fee

What should one throw?, A: C++, unlike only about every other language with...

A: C++, unlike only about every other language with exceptions, is extremely accomodating while it comes to what you can throw. Actually, you can throw anything you akin to. That b

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