Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Help with Deck of cards assignment and getting it to deal... Date: Sun, 03 Aug 2014 11:41:27 -0400 Organization: A noiseless patient Spider Lines: 26 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 3 Aug 2014 15:41:28 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="bd4e1cba8d8592bec5d5ed9e4537fbfd"; logging-data="20396"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tSI4VqOoaQHacsaJBPbep" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: Cancel-Lock: sha1:R5eP4G0VvRqiQCAY8Oefkw1kTTw= Xref: csiph.com comp.lang.java.programmer:29519 On 8/3/2014 11:08 AM, Jeff Higgins wrote: > On 08/01/2014 09:16 PM, Scott Dunning wrote: >> Hello, I have an assignment for my summer class. FYI, I'm super new to >> programming in general and this is my first time with java and it's a >> summer class so it's going super fast (please be nice!) lol. > > No. It seems to be going slowly. The last three assignments you've > brought here are rehashes. Surely by now you should have gone into > interfaces and collections. > > Your Card class will be more easily used if it implement the > java.lang.Comparable interface I'd advise against this, because the ordering depends not on the Card, but on the rules of whatever game is being played. There are games where Ace is high, games where it is low, games where it can be either at the discretion of the player, and for all I know there may be games where Ace can lie between King and Deuce. And then there's the question of suit: How does the Seven of Hearts compare to the Jack of Clubs? Would knowing whether Hearts are trumps affect your answer? Scott: Don't Go There; you'll just get lost. -- esosman@comcast-dot-net.invalid