文件名称:person
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Text]
- 上传时间:
- 2013-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- 葛*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
类Person,包含以下属性:
String name
int age
boolean gender
Person partner。
为Person类写一个marry(Person p)方法,代表当前对象和p结婚,如若可以结婚,则输出恭贺信息,
否则输出不能结婚原因。要求在另外一个类中写一个主方法,来测试以上程序。
(下列情况不能结婚:1,同性;2,未达到结婚年龄,男<24,女<22;3,某一方已婚)-String name
Int the age
Boolean gender
The Person s partner.
For the Person class to write a Mary (Person p) method, represents the current object and p to marry, if you can get married, congratulations to output information,
Otherwise the output reason can t get married. Asked in another class to write a main method, to test the above procedure.
(can t get married in the following circumstances: 1, gay 2, age of marriage has not been achieved, the male < 24, female < 22 3, one married)
String name
int age
boolean gender
Person partner。
为Person类写一个marry(Person p)方法,代表当前对象和p结婚,如若可以结婚,则输出恭贺信息,
否则输出不能结婚原因。要求在另外一个类中写一个主方法,来测试以上程序。
(下列情况不能结婚:1,同性;2,未达到结婚年龄,男<24,女<22;3,某一方已婚)-String name
Int the age
Boolean gender
The Person s partner.
For the Person class to write a Mary (Person p) method, represents the current object and p to marry, if you can get married, congratulations to output information,
Otherwise the output reason can t get married. Asked in another class to write a main method, to test the above procedure.
(can t get married in the following circumstances: 1, gay 2, age of marriage has not been achieved, the male < 24, female < 22 3, one married)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
person.txt