package ed.com;
import java.util.Scanner;
public class dfes {
public void cnn() {
System.out.println("\n\t欢迎使用我行我素客户管理系统\n");
System.out.println("\t\t1.登录系统\n");
System.out.println("\t\t2.退出\n");
System.out.println("**********************************");
System.out.println("请选择,输入数字:");
}
/**
* 返回一个字符串 注释 解释 是一个字符串
*/
public void dezs() {
boolean con;
con = true;
do {System.out.println("欢迎登陆我行我素主菜单:");
System.out.println("1.客户信息管理\n2.真情回馈");
System.out.println("请输入数字或按0返回上一级菜单:");
Scanner input = new Scanner(System.in);
int no = input.nextInt();
if (no == 1) {
dee();
} else if (no == 2) {
deee();
} else if (no == 0) {
// cnn();
break;
} else {
System.out.println("输入错误.请重新输入数字:");
con = true;
}
} while (con);
}
public void dee() {
boolean con;
con = true;
do {
System.out.println("1.查询客户信息\t2.修改客户信息\t3.添加客户信息\t4.显示所有客户信息");
System.out.println("请输入数字或按0返回上一级菜单:");
Scanner input = new Scanner(System.in);
int no = input.nextInt();
if (no == 1) {
System.out.println("1.查询客户信息");
} else if (no == 2) {
System.out.println("2.修改客户信息");
} else if (no == 3) {
System.out.println("3.添加客户信息");
} else if (no == 4) {
System.out.println("4.显示所有客户信息");
} else if (no == 0) {
break;
//dezs();
} else {
System.out.println("输入错误.请重新输入数字:");
con = true;
}
} while (con);
}
public void deee() {
boolean con;
con = true;
do {
System.out.println("1.幸运大放送\t2.幸运抽奖\t3.生日问候");
System.out.println("请输入数字或按0返回上一级菜单:");
Scanner input = new Scanner(System.in);
int no = input.nextInt();
if (no == 1) {
System.out.println("幸运大放送");
} else if (no == 2) {
System.out.println("幸运抽奖");
} else if (no == 3) {
System.out.println("生日问候");
} else if (no == 0) {
// dezs();
break;
} else {
System.out.println("输入错误.请重新输入数字:");
con = true;
}
} while (con);
}
public void frr() {
System.out.println("退出");
System.out.println("请输入数字或按0返回上一级菜单:");
}
}
package ed.com;
import java.util.Scanner;
public class de {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
boolean con=true;
do {
dfes i = new dfes();
i.cnn();
Scanner input = new Scanner(System.in);
int e = input.nextInt();
switch (e) {
case 1:
i.dezs();
break;
case 2:
System.out.println("谢谢你的使用!");
con = false;
break;
}
} while (con);
}
}