文件名称:O5
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.72kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
1,定义一个类Card,该类的对象代表一张扑克牌。要求包含三个属性:点数,花色,和大小王信息(三者均为enum类型)。要求扑克牌能比较大小,比较规则为:
a,大王最大,小王其次。
b,其他的扑克牌按点数大小来比,点数相同的按花色来比(花色从大到小的顺序是:黑桃>红桃>梅花>方块)。
2,为Card类写一个静态方法:
static TreeSet[] dispatch(int players,int reservers),要求用一副扑克牌随机的为多人发牌,并预留给定张数的底牌,返回一个TreeSet数组,保存排好序的每个玩家得到的牌,以及预留的底牌。
3,写一个主方法测试以上程序,输出每次发牌的结果。
-define a class Card, the class object represents a playing card. Requirement contains three attributes: points, color, and size of the king of information (three are enum types.) Asked to compare the size of playing cards, more rules:
a, King largest, followed by Wang.
b, other than poker size in points, points to the same than by color (color in sequence are: spades> hearts> plum> box).
2, for the Card class to write a static method:
static TreeSet [] dispatch (int players, int reservers), require more than a deck of cards for the licensing of random, and set aside a given number of sheets of the cards, return an array of TreeSet, save the sorted each player get the card, and set aside the cards.
3, write a main method to test the above procedure, the output results of each license.
a,大王最大,小王其次。
b,其他的扑克牌按点数大小来比,点数相同的按花色来比(花色从大到小的顺序是:黑桃>红桃>梅花>方块)。
2,为Card类写一个静态方法:
static TreeSet[] dispatch(int players,int reservers),要求用一副扑克牌随机的为多人发牌,并预留给定张数的底牌,返回一个TreeSet数组,保存排好序的每个玩家得到的牌,以及预留的底牌。
3,写一个主方法测试以上程序,输出每次发牌的结果。
-define a class Card, the class object represents a playing card. Requirement contains three attributes: points, color, and size of the king of information (three are enum types.) Asked to compare the size of playing cards, more rules:
a, King largest, followed by Wang.
b, other than poker size in points, points to the same than by color (color in sequence are: spades> hearts> plum> box).
2, for the Card class to write a static method:
static TreeSet [] dispatch (int players, int reservers), require more than a deck of cards for the licensing of random, and set aside a given number of sheets of the cards, return an array of TreeSet, save the sorted each player get the card, and set aside the cards.
3, write a main method to test the above procedure, the output results of each license.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
O5/Card.java
O5/Color.java
O5/Joker.java
O5/Point.java
O5
O5/Color.java
O5/Joker.java
O5/Point.java
O5
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.