2 Replies - 3747 Views - Last Post: 24 September 2011 - 09:51 PM Rate Topic: -----

#1 Oxilili  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 34
  • Joined: 21-November 10

Deck of Cards with an ArrayList

Posted 24 September 2011 - 09:45 PM

In my ongoing quest for knowledge, this is still over my head. I'm trying to find some resources that deal with making a deck of cards, and/or dealing with an arraylist.

Would you recommend typing out 1-51 (integers) then assigning each int to a string(actual value)?
Or is there a fancy for loop that would be better?

I'll start coding tomorrow, I just want to get some plannning/tips ahead of time.
Is This A Good Question/Topic? 0
  • +

Replies To: Deck of Cards with an ArrayList

#2 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7644
  • View blog
  • Posts: 12,890
  • Joined: 19-March 11

Re: Deck of Cards with an ArrayList

Posted 24 September 2011 - 09:50 PM

Arraylist is described quite well here

Specific questions are easier to answer than general ones, and "I don't understand the X class" isn't even a question, it's a statement.



Quote

Would you recommend typing out 1-51 (integers) then assigning each int to a string(actual value)?


If the question is "should I type out the integers from 1 to n?" and the answer is "yes" the second question is "should I dump this stupid language and get a better one?" and the answer is "yes".

In this case, the answer to the first question is "no", you should never do that. If you think you should, go take a walk around the block and rethink the whole thing.

Please sketch out what you intend to write when you start coding tomorrow, and we can troubleshoot your design for you. Probably save you some bother that way.

This post has been edited by jon.kiparsky: 24 September 2011 - 09:51 PM

Was This Post Helpful? 0
  • +
  • -

#3 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8328
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Deck of Cards with an ArrayList

Posted 24 September 2011 - 09:51 PM

http://www.dreaminco...snippet3176.htm
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1