文件名称:person
-
所属分类:
- 标签属性:
- 上传时间:2013-11-26
-
文件大小:720byte
-
已下载: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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.