marryos

所属分类:Java编程
开发工具:Java
文件大小:179KB
下载次数:6
上传日期:2013-01-26 10:20:21
上 传 者zhidan
说明:  写一个Person类,定义人的基本属性:name(姓名)、age(年龄)、gender(性别)、partner(配偶)。 要求至少为Person类写一个marry(Person p)方法,来判断两个人是否可以结婚。如果可以结婚,将其partner属性赋值为其配偶。 结婚必须满足以下3个条件。 必须是异性,同性暂时不允许结婚 有配偶者不能结婚,犯重婚罪。 要达到年龄方可结婚:男方23岁以上,女性21岁以上。
(Write a Person class, define the basic properties: name (name), age (age), gender (sex) partner (spouse). Requires that at least for the Person class to write a marry (Person p) method to determine whether the two people can get married. If you can get married, its partner attributes assigned to his or her spouse. Marriage must meet the following three conditions. Must be heterosexual, homosexual temporarily not allowed to get married Spouse who can not get married, committed bigamy. To reach the age they get married: more than 23-year-old man, 21-year-old female.)

文件列表:
src\zhidan_marryos\marry.java (1669, 2012-12-16)
src\zhidan_marryos\marry_os.java (1694, 2012-12-16)
src\zhidan_marryos\Person.java (1423, 2012-12-16)
文档.doc (208384, 2012-12-16)
.settings\org.eclipse.core.resources.prefs (207, 2012-12-16)
.settings\org.eclipse.jdt.core.prefs (629, 2012-12-16)
bin\zhidan_marryos\marry.class (1004, 2012-12-16)
bin\zhidan_marryos\marry_os.class (1777, 2012-12-16)
bin\zhidan_marryos\Person.class (1304, 2012-12-16)
bin\点击运行.bat (28, 2012-12-17)
bin\运行时看.txt (114, 2012-12-16)
src\zhidan_marryos (0, 2012-12-16)
bin\zhidan_marryos (0, 2012-12-16)
src (0, 2012-12-17)
.settings (0, 2012-12-16)
bin (0, 2012-12-17)

近期下载者

相关文件


收藏者