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

  Prepare the interface which has single method decode

Prepare the interface MessageDecoder which has single method decode(String cipherText) where cipherText is the message to be decoded.

  What will occur to supply-demand in short-term and long-term

Price of product in short-term and long-term also describe why you think supply, demand, or equilibrium price will be different, if at all, in short-term and long-term.

  Approach appropriate for company forefront of technology

However, adopting a secondary approach where others adopt early and a firm learns from their mistakes is often a viable strategy. When is each approach most appropriate and why?

  Rsa protocol to encrypt and decrypt messages

In this problem you are enquired to hand-turn RSA protocol to encrypt and decrypt messages by using rather smaller numbers than are used in practice, so that calculations can be done by hand.

  Client-server computing from file server

Discuss the evolution of client-server computing from file server to multilayer applications to Web-based applications. What has been the driving force causing this evolution? Where do you think network computing will be in the next five years? Ten y..

  Explain computer software required to make computers work

Develop 5- to 7-slide PowerPoint presentation, providing the overview of how computers are used. Distinguish various kinds of computer software required to make computers work.

  Write fields to use as control break fields to make report

Write down fields that you want to use as control break fields to make a report which lists all inventory items in grocery store? Create a sample report.

  Test program by different numbers of command line arguments

If any non-integer values are passed in, program will create error, which is unavoidable at this point. Test program thoroughly by using different numbers of command line arguments.

  Describing online services provided by selected companies

Identify and briefly describe the online services provided by the selected companies (e.g. online catalogue search, online information search.

  Brainstorming skills to determine procedure to follow

The lead investigator gives you these graphics files and tells you that at least four messages should be embedded in them. Use your problem solving and brainstorming skills to determine a procedure to follow.

  Control that programmee with key

Please control that programmee with key (left ,right ,up and down ) and also make a chain of snake when eat egg,and game over when snake strike with hurdel.

  Information assets to estimate for risk management purposes

If the organization has three information assets to estimate for risk management purposes which vulnerability must be estimated for additional controls first? Which vulnerability must be evaluated last?

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