求编写一个表白程序?

2021-12-15 社会 71阅读
JAVA
传说中规范的爱情代码(2010-11-1021:37:36)
转载
标签:it
privatefinalstaticDEPOSIT=100000;
privatefinalstaticFELLING=8;
publicvoidlove(boy,girl){
BooleanisMarried=false;

if(boy.有房()&&boy.有车()){
doMarry(boy,girl);
isMarried=true;
}elseif(girl.愿意等()){
while(!(boy.赚钱>DEPOSIT&&girl.感情>FELLING)){
for(intday=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);
}
privatevoiddoMarry(boy,girl){
boy.set(nothing);
girl.嫁给(boy);
}
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com