Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OOP Interview Question
Message
 
 
À
26/01/2006 12:34:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01090521
Message ID:
01090559
Vues:
10
>>>I'm a big believer that if your a good coder in a different language you'll be a good coder in any language - because it's about the logic and the rest is just syntax. So I was looking for an OOP question that didn't rely on FoxPro knowledge and came up with. Can you describe a deck of cards as objects? Telling me what classes you would create and what properties and methods you would put in each class. To this date only 1 person has ever given me a good response on this question. Is it too tuff of a question or is it a bad question?
>>
>>Chuck,
>>
>>I don't play cards, so I can not answer your question. For me I may try with a chess set. But do you want to be able to define chess figures (how they are called?) as static objects or try to come up with the model for the whole Game?
>>
>>Thanks.
>
>I'm not asking for anyone to create a game. I was looking for something like
>
>I would create a base card class that the rest of the cards would inhertant from. In the base class I would add a property to hold the value of the card 1 to 13, height and width of the card. Then create a subclass of that baseclass for each suit. That suit class could contain it's picture, color of that suit. Then create a container object for the deck that would hold references to the suit class that would have methods like shuffle, deal.
>
>Something along that lines.

Why do we need height and width? I don't think they play any role at all. That's why we need to figure out first, what we're describing. Static objects for presentation only?

Anyway, as I said, I don't play cards, so shuffle and deal do not ring a bell.

In other words, this question is too hard for the interview and also you should keep in mind that some applicants may not play cards at all.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform