Quote:6. A table class can do the conversion from 1 to Ace when u view the table.
Actually I disagree. Mainly in that you should be checking aces when totaling the player's hand for any reason - whether it's to check for 21/bust, or to compare for winners. Your comparison function needs to be smart enough to know how to use the Ace in the hand, too - using it as a 1 and an 11. I did this by keeping track of how many aces were in the hand while looping through the hand, and then calculating each ace depending on the current total, after I'd done all the other cards.
I also don't agree with using a global constant for setting the size of the deck; this should be passed to the deck as a constructor argument. This way, you can use your deck class again later no matter what game it's in (as some games use decks of different sizes), or at least extend its basic functionality into subclasses (RumDeck, GoFishDeck, etc etc etc). And you can do it without using a global to define a class member's size (which, in my opinion, goes against OO anyways).
I don't really see a need for a Table object, as much as for an interface class that will handle all your update calls generically - paint the screen, update it with the player's cards, etc etc. This'll take the junk of displaying out of your main loop and let it focus on the logic (rules) of the game. The only thing I found that I needed to keep track of related to the table was how many games the player had won at the current table.
// ------------- things I noticed in particular about your code
If you're going to use a Card constructor with no parameters, then you should have a static variable inside the constructor that tells what card comes next in the logical progression. This way you won't break your code by accidentally not providing an argument. (This is a better method anyway, in my opinion - your deck constructor can just keep calling = new Card() on objects up until it reaches the size of the deck and you don't have to worry about your loop counting logic being wrong.)
With your Card class, what I would do is define a constant inside of that class (or global or something) that is an array of faces and values. That's what I did in my game; there were two arrays consisting of the face ("Two", "Three", "Ace", etc) and then the Suit. The modulo of the index by the faces array provides the char representation of the card's face, and index/faces.length provides the suit. This way you only have to store one copy of the faces/suits in memory, and you don't have to pass them to each card; you can have the cards handle their own descriptions and remove yourself from the equation, not to mention use less memory.
You shouldn't really need a function to return whether or not the card is an ace; this should be irrelevant, and if it is relevant it will be obvious if its value is 1 or if its value is 11 and its face is "Ace". (Though a simple distinction between 1 and 11, regardless of the face value, should be sufficient for whatever you're doing with it.) Tell your instructor I said he's overcomplicating things. :-)
Your hand class's requirements don't jive with me. Why does he want you to write two separate functions to do the same thing - take cards? Just write one hit function, and pass it a Card object. If you need to deal the initial two cards, just call it twice. Be sure to pass it a Card object from the Deck, otherwise you run the risk of duplicating cards (the game won't be very true if both players somehow wind up holding the Ace of Spades).
=========================Buildium. Codium. Fragium.http://www.aklabs.net/=========================