How Software Gets Done  


Login

Software Buyers
Request bids
Search coders
My Buyer Account
Buyer help
Buyer articles
Buyer FAQ
Latest news
 
Software Coders
Newest open work
Browse all work
Search all work
My Coder Account
Coder help
Coder articles
Coder FAQ
Latest news
 
Affiliates
My Affiliate Account
Affiliate help
Affiliate FAQ
Latest news
 
Newest Bid Requests.
(See all)
ASP and Excel import to SQL
By wow1234 on Sep 18
Max Bid: $10


Serious Main Page Redesign
By passionatesac on Sep 18
Max Bid: Open to fair suggestions


jpeg validator resize program
By coderod on Sep 19
Max Bid: Open to fair suggestions


Win2k drivers for Sony VAIO PCG-505TX
By hketola on Sep 18
Max Bid: $20


WORKING ASSETS
By Galexa1611 on Sep 18
Max Bid: $500


NTFS/FAT16/FAT3 2 file and directory manipulation
By NDawg on Sep 18
Max Bid: $75


Click here to put this ticker on your own site and/or get live RSS newsfeeds

Open Work Categories.
Database 
(206 open)
   Access 
(72 open)
   MySQL 
(118 open)
   Oracle 
(11 open)
   SQL Server 
(82 open)
   Other DB 
(23 open)
Documentation / Tech Writing 
(26 open)
   Language (Human) Translations 
(11 open)
Data Entry 
(43 open)
Game Development 
(20 open)
Graphics / Art / Music 
(57 open)
   Graphics 
(61 open)
     Adobe AfterEffects 
(10 open)
     Adobe Photoshop 
(33 open)
     Adobe Premiere 
(8 open)
     3d Animation 
(16 open)
   Art (Misc.) 
(16 open)
   Music 
(9 open)
   Photography 
(5 open)
   3d Modeling 
(13 open)
Language Specific 
(141 open)
   Assembly / Machine language 
(12 open)
   ASP 
(69 open)
   ASP .NET 
(70 open)
   C# 
(71 open)
   C++ / C 
(154 open)
   Carbon (Mac OS) 
(4 open)
   Cocoa / Obj-C 
(5 open)
   Cold Fusion 
(16 open)
   Delphi 
(57 open)
   Java 
(88 open)
   JSP 
(15 open)
   Perl 
(53 open)
   Python 
(6 open)
   PHP 
(119 open)
   XML/XSL 
(40 open)
   Visual Basic 
(166 open)
   Visual Basic .Net 
(110 open)
   Other 
(78 open)
Misc 
(32 open)
   Middleware 
(2 open)
   CAD 
(5 open)
MultiMedia 
(30 open)
   Video Editing 
(6 open)
Network 
(34 open)
   Network Design 
(4 open)
   Network Implementation 
(7 open)
Platforms 
(71 open)
   Windows 
(194 open)
     MS Exchange 
(14 open)
     MS Office 
(23 open)
     Other 
(12 open)
   Darwin 
(3 open)
   Embedded Systems 
(9 open)
   Hand Held/PDA Programming 
(13 open)
   Internet Browser 
(50 open)
   Linux 
(73 open)
   Lotus Notes / Domino 
(2 open)
   UNIX 
(36 open)
Requirements 
(8 open)
Security 
(31 open)
Testing / Quality Assurance 
(14 open)
Web 
(185 open)
   Page Design 
(91 open)
   Flash 
(62 open)
   Marketing 
(18 open)
     Search Engine Optimization 
(11 open)
     Marketing (Other) 
(15 open)
   Web Services 
(97 open)
   Web (Other) 
(107 open)
Training 
(9 open)
   Computer Based 
(12 open)
Other
 
Other Sites

Download the free Rent A Coder IE toolbar!
 
Show Bid Request

program 6
Bid Request Id: 15048
Bookmark in my 'To Do' list
Posted by: mskelly16 (1 ratings)
(Software buyer rating 10)
Non-action Ratio: Very Good - 0.00%
Buyer Security Verifications: Unverified
Approved on: Apr 30, 2002
6:29:17 PM EDT
Bidding Closes: May 1, 2002
7:50:04 PM EDT
Viewed (by coders): 164 times
Deadline: 5/2/2002
TIME EXPIRED
Phase:
100% of work completed and accepted. Coder has been paid.
Max Accepted Bid: Bidding is closed
Project Type: Personal Project / Homework Help
Bidding Type: Open Auction
Categories: C++ / C
Enter chat room for this bid request
(0 active users at Sep 19, 2003 7:36:09 AM EDT)

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:
visual c++

Must be 100% finished and received by buyer on:
May 2, 2002 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:
beginner c++ class program


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!
Sanpee
(29 ratings)
in Gelugor, Penang
Malaysia
Bid id: 164,067
 
$10 (USD) Apr 30, 2002
9:35:29 PM EDT
 9.31
(Superb)
   
I'm experience in C++(any compiler). I need this to reclaim my rating.
 




Bid Request Search
 Advanced Search
Newest Open Work
Latest News  
Credentials


 

 
Rent A Coder upholds the rigorous business practices required to be both a BBB member and Square Trade vendor.
  • All customer issues addressed within 2 days
  • Openly disclosed pricing and return policies
  • Participation in mediation at buyer request
  • Superior selling track record
This site is verified through its parent company, Exhedra Solutions, Inc.
 
Top Coders.

Securenext
Rated a 9.97 on 122 jobs 
Buddies
Rated a 9.85 on 94 jobs 
Codman
Rated a 9.97 on 158 jobs 
hernest
Rated a 10 on 122 jobs 
Andrei Remenchuk
Rated a 10 on 14 jobs 
D-N-S
Rated a 9.93 on 39 jobs 
markesh
Rated a 10 on 23 jobs 
Maxnet Technologi es Private Limited
Rated a 9.93 on 86 jobs 
GribFritz
Rated a 9.89 on 144 jobs 
PSergei
Rated a 9.77 on 105 jobs 

See all top coders...

(What makes a top coder?)

Top Exam Scorers

 
Other
Rent A Coder is PayPal verified through its parent company, Exhedra Solutions, Inc.

Created in partnership with:

 

Affiliate Sites
Latest News | About Us | Kudos | Feedback/Contact    Affiliates | Advertise    Privacy | Legal

Copyright 2001, Exhedra Solutions, Inc. All rights reserved.
By using this site you agree to its Terms and Conditions.
"Rent A Coder" (tm), "Safe Project Escrow" (tm) and "How Software Gets Done" (tm)
are trademarks of Exhedra Solutions, Inc.