Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question: ?Game Of Hearts (C++) I Have A 69% In My C++ Class And I Need This Program To Work To Get Any Credit For
Question:?Game Of Hearts (C++) I Have A 69% In My C++ Class And I Need This Program To Work To Get Any Credit For It So I Can Pass My
Homework 3-Game of Hearts Before writing any code, play a few games at playhearts-online.com Write a program that plays the card game of Hearts. Your program should build on your code for Deck of Cards Lab, Double or Nothing Lab, and Shuffle and Sort Lab. Add members to your Card and Deck classes as needed. Create a new Player class with these member variables: Card hand[13]-stores cards dealt to player int points - total number of points player has accumulated so far String name - name of player Player has these member methods: void displayHand()-displays descriptions of cards in hand on console void addCard()- adds a card to hand during deal Card playCard(Suit lead, boolean leader)-returns the Card played - if leader is false, card must be in the lead suit Add constructors, get and set functions, and other members as needed. Keep your main program simple. Most of your logic should be in member methods of classes. See the following pages for sample display and rules of the game. Challenge (optional - 1 bonus point) Make your program smart enough so that any one of the computer players beats the TA in one game. You must follow two rules: You cannot 'rig' the deal. Shuffle and deal must be random. Players cannot see each other's hands. Players are aware only of their own cards.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started