java猜拳游戏程序

  • t4_193934
    了解作者
  • 4.1KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-23 09:09
    上传日期
int count = 0; Scanner input = new Scanner(System.in); User person = new User(); Computer computer =new Computer(); public void chuShiHua(){
net.rar
  • net
  • ew
  • d
  • GiftManagement.java
    766B
  • test.java
    184B
  • CustManagement.java
    1.6KB
  • TestManagement.java
    351B
  • Data.java
    661B
  • game
  • b
  • Play.java
    1.6KB
  • User.java
    665B
  • TestGame.java
    978B
  • Computer.java
    431B
内容介绍
package net.ew.d; import java.util.*; public class CustManagement { Data data = new Data(); int index = -1; Scanner input = new Scanner(System.in); public void setData(){ data.initial(); } public void Modify(){ /* //System.out.print("请输入会员号:"); //int custNum = input.nextInt(); for(int i =0;i<data.custNo.length;i++){ if(data.custNo[i]==custNum){ index = i; break; } }*/ System.out.println("*************************************************************\n"); System.out.println("\t\t\t\t1.修改会员生日\n"); System.out.println("\t\t\t\t2.修改会员积分\n"); System.out.println("*************************************************************\n"); System.out.print("请输入数字:"); int num = input.nextInt(); //for(;;){ if(num == 1){ System.out.print("请输入修改后的生日:"); String brithDay = input.next(); data.custBirth[index]=brithDay; System.out.println("生日已修改!"); //break; }else if(num==2){ System.out.print("请输入修改后的积分:"); int score = input.nextInt(); data.custScore[index]=score; System.out.println("积分已修改!"); //break; }else{ System.out.println("输入错误!"); } //} } public void Show(){ //System.out.print("请输入会员号:"); int custNum = input.nextInt(); for(int i =0;i<data.custNo.length;i++){ if(data.custNo[i]==custNum){ index = i; break; } } System.out.println("会员号\t生日\t积分"); System.out.println("--------|--------|--------"); System.out.println(data.custNo[index]+"\t"+data.custBirth[index]+"\t"+data.custScore[index]); } }
评论
    相关推荐