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

  Business uses networks-computers-support business functions

Think about a business you are familiar with, one which urilizes networks and computers to support business functions. Make a list of ten important, specific items like computers, disks.

  Clash of atoms and reactions generated in brains

Do you think that Hobbes was on to something with his theory? Is there joy or fear out there, or is it all inside of us and how we perceive and react to a situation?

  What do you mean by ascii or ebcdic

What is ASCII or EBCDIC? What part do the aforementioned things play in hashing? What is the formula for the PPD? What does the numerator and denominator say about the potential performance issues of this metric?

  Details on any information

Details on any information/software that might not be submitted for evaluation due to NDA requirements or security/privacy concerns.

  Bob''s encryption company

Suppose Bob's encryption company produces two machines, A and B, both of this are supposed to be implemen- tations of RSA using the same modulus n = pq for some unknown primes p and q

  Kinds of attitudes for upper management personnel

Explain in scholarly detail why it is recommended that business communications be oriented toward upper management and what kinds of attitudes should these upper management personnel possess.

  Which installation is suitable for customer tracking system

Which installation options are available for Customer Tracking System? Which would you suggest? How can you determine if implementation has been successful?

  Differentiate centralised and distributed data processing

Explain the differences between centralised and distributed data processing. Describe the pros and cons of each approach.

  First two training iterations of backpropagation algorithm

Consider a two-layer feedforward ANN with two inputs a and b, one hidden unit c, and one output unit d. This network has five weights (w,, web, wd, wdc, wdO), where w,o represents threshold weight for unit x

  What is a knowledge repository?

What is a knowledge repository? What is a community of practice? What is a chief knowledge office? What are his or her duties? What is natural language processing? What are the three (3) levels of voice recognition? What is a learning system?

  Describing how prolog executes command

Describe how Prolog executes command (query) and goal matching process.

  Describe how to structure worksheet

Describe how you will structure your worksheet, including the titles, column headings, the formulas to calculate the cost for each employee (which may include cost for a guest),

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