A virtual boolean method that indicates

Assignment Help Basic Computer Science
Reference no: EM13164997

A class card that represents a playing card.
Data members should include at least:

  •  a rank (ace, 2, 3, etc.)
  •  a suit (hearts, spades, clubs, diamonds) ? Methods (member functions) should include at least:
  •  int get_value() which gets the value of the card



A class hand that represents a Baccarat hand. It is a collection of cards.

  •  Data members should include at least:
  •  A vector of pointers to card objects (See pp. 898 - 904 of Dale and Weems and
  • also the notes at the end of this assignment for information on vectors.)
  •  Member functions should include at least:
  •  void add(card* c) which adds a card to the hand by adding a pointer to a card
  • object to the vector of cards representing the hand
  •  void clear() which removes all cards from the hand and cleans up all deleted
  • objects
  •  int get_total() which returns the total value of the hand


A class deck that represents the deck of cards. This class should be derived from the class
hand (because it is just a collection of card objects) but it has some extra functionality that a
hand does not have, like shuffling and dealing.
? Data members should include all those inherited from hand and any others you wish to
include.
Member functions should include at least:

  •  void build_deck() that creates a standard deck of 52 card objects
  •  void shuffle() that shuffles the cards in the deck
  •  void deal (hand &h) that deals one card to a hand



A class generic_player that represents those elements that all players have in common.
Because a player can be viewed as a Baccarat hand with a name, this class should be derived
from the class hand.

  •  Data members should include any inherited data members plus
  •  A string representing the player's name
  •  Any other data members you think you may need
  •  Member functions should include any inherited methods plus
  •  A pure virtual Boolean method indicating whether the player gets another card
  •  A Boolean method indicating if the hand is a natural
  •  A method that announces that the player wins
  •  Any other methods you think you might want


A class player that represents the human players. The human player is just a player whose
behavior differs from that of the banker, it should be derived from the class generic_player.

  •  Data members should include all those inherited plus any you want to add
  •  Member functions should include any inherited methods, plus at least
  •  A virtual Boolean method that indicates whether the player gets another card
  •  A method that announces that the player wins.
  •  A method that announces that the player loses.
  •  A class banker that represents the banker. The banker is just a player whose behavior differs
  • from that of the human player, it should be derived from the class generic_player.
  •  Data members should include all those inherited plus any you want to add
  •  Member functions should include any inherited methods, plus at least
  •  A virtual Boolean method that indicates whether the house gets another card


A class game that represents the Baccarat game.

  •  Data members should include at least:
  •  A deck of cards
  •  The banker's hand
  •  The player's hand
  •  Any other data members that you want - depending on how you do things, you

may want to represent such things as the number of player wins, the number of
banker wins, the number of ties, etc.
 The methods of this class should include at least

 void play() - a method that plays a game of Baccarat (that might involve
multiple rounds)

Reference no: EM13164997

Questions Cloud

Explain the main concept behind the vsepr theory : explain the main concept behind the VSEPR theory of molecular shape. how do both number and type of electron pairs influence the shape of a molecule?
What total incremental costs will martinez incur : For financial accounting purposes, what is the total amount of product costs incurred to make 10,000 units and what total incremental costs will Martinez incur if it increases production from 10,000 to 10,001 units?
Complete the twins() method : Complete the twins() method, which takes an integer argument n and prints all the sets of twin primes that are less than n, one pair per line
Give a curved-arrow mechanism for the transformation of a : Identify intermediate A, which has a molecular formula of C10H16O2, and give a curved-arrow mechanism for the transformation of A to the final product
A virtual boolean method that indicates : Data members should include all those inherited plus any you want to add  Member functions should include any inherited methods, plus at least  A virtual Boolean method that indicates whether the player gets another card  A method that announces that..
Global market : What are some strategies that a company like Kellogg may employ to enhance their likelihood of success in the global market?
Journal entries to record the transactions of panorama : Prepare the journal entries to record the transactions of Panorama Ltd up to and including that which took place on 16 June 2012. Show all workings.
What would be the best method of separating the particles : sand and iron particles that are similar in size and color are mixed together in a beaker. what would be the best method of separating the particles?
Strongly influenced and informed by philosophy : Most people have views that are strongly influenced and informed by philosophy, often without realizing it. Identify a view you have—whether on politics, religion, science, culture, or even the media and entertainment—that might be regarded as being ..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Types of pre-created objects that can be used on web sites

Types of pre-created objects that can be used on Web sites. Describe the objects you find and what they are used for. Include links to the sites you used in your research.

  Explain checksum detect all errors caused by odd number

Let the 32-bit hash function defined as concatenation of two 16-bit functions: XOR and RXOR. Will this checksum detect all errors caused by odd number of error bits? Describe.

  Wearable computing technology

A REPORT OF WEARABLE COMPUTING TECHNOLOGY IN RESOLVING TIME SHEET ISSUES FOR PAYROLL SYSTEM INPUT TO THE CEO

  Explaining slash dotted and flash crowd

What do terms slash dotted and flash crowd signify to?

  Advantages and disadvantages of grassroots computing

Discuss how grassroots computing changes the way software is designed, developed, tested, and maintained in a typical organization. What are the advantages and disadvantages of grassroots computing?

  Drawing crow-s foot erd using a specialization hierarchy

Given the following business scenario, create a Crow's Foot ERD using a specialization hierarchy if appropriate.

  Creating an oracle

The clique problem itself is NP-hard. Thus you may not wish to have an oracle that runs in exponential time. Consider approach to approximate the solution.

  Function prototypes lack parameters

These function prototypes lack parameters; add whatever parameters you feel are necessary so that the program works without global variables. The program's output should reflect the bus's actions by reporting each change in state, along with the n..

  Recursive multiplication

Recursive Multiplication Write a main program that uses a recursive function. This function accepts two arguments into the parameters x and y.

  Determine degree of statical indeterminacy

Is it statically determinate? If it is not statically determinate, determine its degree of statical indeterminacy? b) Determine the member forces roughly by assuming that diagonal members can't carry compressive loads.

  Program that reads a series of whitespace

Write a program that reads a series of whitespace delimited strings from stdin and prints them back out, separated by spaces, in lexicographic order. You may assume that all strings are lower case and that no string has more than 20 characters.

  Explaining database system of facebook and google

Does Facebook and Google use same database system? Facebook seems to run with the android platform using gmail address to retain information for user such as phone numbers and contacts.

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