Find Jobs
Hire Freelancers

java program Card Dealer

$30-5000 USD

已取消
已发布超过 19 年前

$30-5000 USD

货到付款
**Objectives:** 1) Understanding the implementation and use of a _linked list_ ADT. 2) Review of _inheritance_ 3) _Documenting_ ADTs 4) Enforcing _modular programming_ **Problem Definition:** *Title*: Card Dealer *Description*: A program is needed to deal hands for a simulated card game in which all cards are dealt to four players. The program simply starts with a full standard deck of 52 cards, and randomly divides them into 4 hands. After the hands are displayed, the user can choose to deal again or quit. *Note*:You don't have to be a card player to understand the program; all you have to do is deal all 52 cards to four players (as in 4-player “Hearts??). ## Deliverables **Requirements:** 1) You will need a **Card** class to represent a card (suit and value). This class must implement *Comparable*. Cards are ordered first by suit (Clubs, Diamonds, Hearts, Spades) and then by face-value within each suit. Aces are high, so you might want to assign face-values in [2 .. 14]. 2) You will need a **Node** class for storing *Card*s. It should be generic. 3) You must implement your own **LinkedList** class for structuring the *Node*s. The *LinkedList* class must use a generic dynamic linking implementation. 4) Your **CardDeck** class and **CardHand** classes must both _inherit_ from your *LinkedList* class. i.e.: · A *CardDeck* is a linked list of *Card*, plus a counter (*numCards*) to keep track of the number of cards remaining in the deck. · A *CardHand* is a linked list of *Card*, plus the name of the *player*. (Players' names may be hard-wired, e.g., "North", "East", "South", "West".) 5) The *Game* class is a *CardDeck* and an array of four *CardHand*s. 6) All user input in the client program must be handled through a separate **UserInterface** class. 7) Each class must be in its own separate file. 8) Your classes must be documented. Remember that ADT documentation should be directed toward the client programmer. 9) There will be at least 9 files to be handed in (example names): *Dealer**.mcp, [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL]* and *UserInterface*.*java*. 10) When a *CardDeck* is initialized, it may be in any order. To deal one card, your *deal* method must generate a random number in [1 .. *numCards*], remove the corresponding card from the deck, put the card into the appropriate player's hand _**in order**_, and decrement *numCards*. 11) When the user chooses to deal again, the deck must be re-initialized, and the players' hands must be cleared before dealing. 12) The usual requirements apply: modularity, internal documentation, object orientation. ## Platform java in windows platform
项目 ID: 3307652

关于此项目

远程项目
活跃13 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作

关于客户

UNITED STATES的国旗
Corvallis, United States
0.0
0
会员自8月 7, 2004起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。