Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Random cards

 
Paul Hambleton
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.

I have a very basic understanding of java and have been asked to write a simple program to generate 6 random playing cards cards and print out what they are? I am not sure how i should approach this, could i get some advice please as i have no clue where to start.

Thanks in advance.
 
Junilu Lacar
Bartender
Posts: 7466
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,

Welcome to the Ranch!

We encourage community members to SearchFirst (<--click) then come back with specific questions. You might try to google for "shuffle and deal cards in java".
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A basic programming rule is to break your requirements down into smaller parts, and implement each of the parts separately as far as possible.

Now, in your case your requirements contain the word "and" right in the middle. This suggests an obvious division of the requirements into two parts. So, now you have two smaller tasks. Pick one and get started on it.
 
Paul Hambleton
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your advice thus far, appreciate your time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic