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

Operator overloading, write aprogram in c++ to overload +,-,=,++ operator ...

write aprogram in c++ to overload +,-,=,++ operator using unary and friend function in a single program

Get reverse engineer to linux game routine analysis, Get Reverse Engineer t...

Get Reverse Engineer to Linux game routine analysis Project Description: I want a fast and efficient reverse engineer with good knowledge of assembly x86 language, strong rev

Working a homework programming assignment in C++, I am working on a program...

I am working on a program that allows a player to play a game against the computer. In this game the player can only chose to draw 1, 2, or 3 toothpicks. How do I make restrictions

Stack, flow chart for push operation in stack

flow chart for push operation in stack

Computes the area of a circle of radius r, (a) Write a procedure called (ar...

(a) Write a procedure called (area-of-rectangle h w) that computes the area of a rectangle of height h and width w. (b) Write a procedure called (area-of-circle r) that computes

Program to implement a ftp client, Write a program in C to implement a FTP ...

Write a program in C to implement a FTP client that can interoperate with a default FTP server . The client should implement basic FTP commands GET PUT LIST DELE . GET -> to

C++ multiplayer game programming project, C++ Multiplayer Game Programming ...

C++ Multiplayer Game Programming Project Project Description: We are seeking an experienced C++ Game Programmer to enhance clientside related aspects of MCS: Mars City Securi

Oop, what is oop?

what is oop?

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