Objectives:
1. Defining classes using separate compilation
2. Use classes, vectors, and pointers.
3. Use dynamic memory
4. Model a deck of playing cards as C++ objects
1. You are to implement the following Card class.
enum Suit {HEARTS, CLUBS, SPADES, DIAMONDS};
enum Rank {ACE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING};
First place the code above in a header file Card.h and make sure it has include guards. Then define the Card member functions in the implementation file Card.cpp. I provided the definition of Card’s toString() member function below to help get you started:
2. You are to implement the following class CardDeck which models a standard deck of 52 playing cards:
Be sure to put the code above in a header file called CardDeck.h with include guards and the appropriate include statements. The definitions of the CardDeck class member functions should go in the implementation file [login to view URL] Make sure the implementation file includes the CardDeck header file.
The constructor should create 52 Card objects individually (no loops) using the new operator (dynamic memory) and add each Card object to the CardDeck object’s vector<Card*> member deck.
For each Card pointer in the deck, the destructor should call the delete operator to free up the dynamic memory occupied by its Card pointee and then remove the Card pointer from deck.
3. Place the following driver program in an application file [login to view URL]
• header files: Card.h, CardDeck.h
• implementation files: [login to view URL], [login to view URL]
• application file: [login to view URL]
(See complete assignment in attached PDF)
Hi..
I am Nikhil.
I have working experience of 3+ year in C++ Development.
I have done work on:
1. Data Structure like: Set, Vector, Stack, Linked list, Tree(Any type), Graphes.
2. STL ( Tamplate Library )
3. Networking Socket, IO programming
4. File Handling and Parsing.
I have done several projects on Games, You can check in my profile and I have good reviews also..
Games like:
1. Sudoku Solver
2. Gobblet Game
and Many others..
Let start conversation so you get to know about my skills and ability.
Please give me a chance to do work with you and I am promising you that you will not disappoint by me.
I am very sure that I will do this within 1 day.
Please give a chance to conversation with you.
I am waiting for your positive response.
Thank you.
Nikhil
$20 USD dalam 0 hari
4,7 (21 ulasan)
4,0
4,0
12 freelancer menawar dengan rata-rata $30 USD untuk pekerjaan ini
Hi, I am placing my bid on your project because I have read the requirements and I am confident enough with my C++ and algorithm skills. I am focused mostly on doing computer science homework here in freelancer.com and I would like to help you get this project done if you would give me the opportunity. I am a computer science professor and practitioner and this assignment is one of the fields that I teach very well so I can assure you an accurate result. Let me know if you are interested so I can start. Thanks.
Hello,
I have 25 years experience programming in C++. This is not a big project, given what they have prepared for us.
A milestone payment for the full budget of your project must be deposited with this site before your offer can be accepted.
Alan Idler
Chief Software Architect
Idleswell Software Creations
I am an experienced programmer with over 3 years experience in Java, C#, 5 years in C, C++. I am good at math, algorithm and always provide clean code, well documented.