Solved

# Playing card game

Posted on 2005-04-18
206 Views
Last Modified: 2010-03-31
Hi

every one

I am tring to write a standred playing card is any one know how to helpe me

thank you
0
Question by:Ansary100
5 Comments

LVL 35

Expert Comment

is this homework?  Playing card games are usually homework ;-)

What problem are you having?
0

Author Comment

this is not homework I am traying to learn mor about arrays

0

LVL 35

Expert Comment

So why not ask a question about arrays?

We cannot just write reams of code for a Card game (as that won't help you learn about arrays)

We can give advice about arrays though, or answer an array based question...

I assume you've read this:

http://java.sun.com/docs/books/tutorial/java/data/arraybasics.html

?
0

LVL 24

Expert Comment

Don't create solitaire again.
Please read a booklet on card games first to make your choice.
On the internet you'll find databases full of card images,
so your creativity can be focused on the calculus.
;JOOP!
0

LVL 21

Accepted Solution

Do you need help getting started?

To write ANY program, you need to analyze what objects/classes you will need.  For example, for a card game, you could have these objects:
Deck - A Deck is a random collection of cards
Card - A card can be numbers 2-10, J, Q, K, A (Ace could be high or low based on rules)
Rules - The rules manages how individual cards interact with each other (e.g. Is an ace high or low)

This is just a sampling of classes you might need, there might be more.

Does this help?
0

## Join & Write a Comment Already a member? Login.

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

#### 730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

#### Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!