求编写一个表白程序?
展开全部
JAVA
传说中规范的爱情代码(2010-11-10 21:37:36)
转载
标签:it
private final static DEPOSIT = 100000;
private final static FELLING = 8;
public void love(boy, girl) {
Boolean isMarried = false;
if(boy.有房() &&boy.有车()) {
doMarry(boy, girl);
isMarried = true;
} else if(girl.愿意等()) {
while(!(boy.赚钱 > DEPOSIT && girl.感情 > FELLING)) {
for(int day=1; day <=365; day++) {
if( day == 情人节 ) {
if(boy.givegirl(玫瑰)) {
girl.感情++;
} else {
girl.感情--;
}
}
if(day == girl.生日) {
if( boy.givegirl(玫瑰) )
{
girl.感情++;
}
else {
girl.感情--;
boy.拼命赚钱();
}
}
}
if(boy.有房() && boy.有车()) {
doMarry(boy, girl);
isMarried = true;
break;
}
年龄++;
girl.感情--;
}
}
if(!IsMarried) {
girl.goto(another_boy);
}
private void doMarry(boy, girl) {
boy.set(nothing);
girl.嫁给(boy);
}
传说中规范的爱情代码(2010-11-10 21:37:36)
转载
标签:it
private final static DEPOSIT = 100000;
private final static FELLING = 8;
public void love(boy, girl) {
Boolean isMarried = false;
if(boy.有房() &&boy.有车()) {
doMarry(boy, girl);
isMarried = true;
} else if(girl.愿意等()) {
while(!(boy.赚钱 > DEPOSIT && girl.感情 > FELLING)) {
for(int day=1; day <=365; day++) {
if( day == 情人节 ) {
if(boy.givegirl(玫瑰)) {
girl.感情++;
} else {
girl.感情--;
}
}
if(day == girl.生日) {
if( boy.givegirl(玫瑰) )
{
girl.感情++;
}
else {
girl.感情--;
boy.拼命赚钱();
}
}
}
if(boy.有房() && boy.有车()) {
doMarry(boy, girl);
isMarried = true;
break;
}
年龄++;
girl.感情--;
}
}
if(!IsMarried) {
girl.goto(another_boy);
}
private void doMarry(boy, girl) {
boy.set(nothing);
girl.嫁给(boy);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询