十二章上机练习3 新

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);

	}
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值