Show Bid Request
acs class prog
Bid Request Id: 15364
|
|
|
Posted by: |
mskelly16 (1 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Very Good - 0.00%
|
Buyer Security Verifications: |
Unverified
|
Approved on: |
May 3, 2002 4:19:14 PM EDT
|
Bidding Closes: |
May 4, 2002 4:28:02 PM EDT
|
Viewed (by coders): |
72 times
|
Deadline: |
5/5/2002 10:00:59 AM
TIME EXPIRED
|
|
|
|
Description:
The problem You will be writing an object oriented program to play the card game WAR. War is a card game played between 2 people (for our purposes). It is played with a regular deck of 52 cards. (13 cards: ACE (1),2,3,4,5,6,7,8,9,10,j,q,k; of four suits: hearts, spades, clubs, diamonds). In this game, ace is high(so you can store its value as 14) and suit does not matter.To begin War. each player starts with half the deck. they each turn over their top card to compete in battle. the player with the highest valued card wins the battle and places both cards on the bottom of their hand. if there is a tie, each player lays 3 cards face down and a 4th card face up to complete the battle. the winner here takes all cards on the table and places them on the bottom of their hand. the game is over when one player runs out of cards. Note: if there is a tie and one player does not have 4 additional cards(3 to lay face down and one to face up)that player not only looses but looses the war and the game is over. The program must use 3 classes A CARD CLASS this class will have 2 data members:an int (value) and a character (suit) It requires at least these member functions: 1. a default constructor and a constructor to set the value and suit 2. a function to get the value of a card 3. a function to print the cards value (2,3,4,up to 10)or the name of face cards(jack,queen,king.ace)and the name of the suit to the screen. 4.two helper functions to be called by the print function above that will print the face card values as their name(ace,jack,queen,king)and the name of the suit. A DECK CLASS this class will have 2 data members: a deck consisting of an array of 52 card types and an integer size. It requires at least these member functions: 1.a default constructor that initializes the deck array to empty cards (calling the default card constructor)and the size to zero 2.Get functions to a. return a single card from the deck array b. return the current size of the deck. 3.A function to initialize the deck to hold 52 cards with value ace,2,3..king of each suit and set the size to 52. 4.A function to shuffle the deck (use a for-loop that trades 2 randomly chosen cards in the array,repeated 100 times. 5. A function to deal one card from the top of the deck(reducing the size and moving all remaining cards up in the array. 6.A function to add one card to the bottom of the deck(first empty index)and increase the size of the deck(this card will be passed in)cont.
Deliverables: continued from description- 7.A function to print a single card (should call the appropriate Card class function) 8.A function to print the entire deck(needed only to verify the contents of deck) A PLAYER CLASS: This class will have 4 data members: a integer(player ID),a (hand) of deck type, a string name, and an integer (games played) It requires at least these member functions: 1. A default constructor and a constructor to set the ID and players name(as passed in)(all constructors should initialize ALL variables. 2. Get functions for:the name, the player id, the number of games played, the current size of the hand(calling the appropriate Deck function) 3.A function to increment the number of games played. 4.a function to play the top card from the table and add it to the bottom of the hand(this too will call the appropriate deck function)
NOTE: THESE classes may have additional functions as you deem necessary but do not add additional data functions.
PROGRAM REQUIREMENTS: 1. Program should begin with a welcome message that either displays the rules or offers to display them if the user wishes to view them. 2.it should end with "thanks for playing" message and ask the user to play again soon. 3. you should provide the user with a menu to choose from at least 4 predefined players each time a game begins. a. the menu should show the played ID, the player name, and the number of games played by that player b. you must provide data verification to check data entry and allow the user to re enter correct choices when mistakes are made: a. the user must have a suitable id choice b. the user must choose 2 different player id's. 4. The user should have the choice to continue or quit when a. the game ends b. After each multiple of 10 battles are played (so during play, you must count each completed battle). 5. During the game you should: a. Print the players name and the current card played. b. then tell who won the war c. then list the number of cards each palyer currently holds example: Bob played a king of hearts Sally played a 9 of diamonds bob wins this war! bob has 18 cards sally has 34 cards
- when the player runs out of cards you should declare a winner.
after program is complete the file should be split into 7 separate files(a header file (containing the class definition)and acpp. file (containing the member function definitions not included in the class definition) for each class and a .cpp file for main(also containing non member functions.
Platform:
This is a visual c++ program, and i don't want it advanced . it is for a BEGINNER course. I USE WINDOWS 98. IF THAT MATTERS.
Must be 100% finished and received by buyer on:
May 5, 2002 10:00:59 AM EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Special Conditions / Other:
Simple classroom program. i'll send an example of my last program to see the level of experience needed.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
This bid was accepted by the buyer!
|
$25 (USD)
|
May 3, 2002 4:39:39 PM EDT
|
9.97
(Excellent)
|
|
|
I have worked on a project for you before and hopefully you liked my work. I can do this project for you with simple comments so you understand the code. Code will be written in a simple manner consistant with a beginner level course. I can have it done by end of day tomorrow. Thanks for considering my bid Saquib |
|
|
|
|
|