demo客户

import java.util.Scanner;

public class z1 {
	Scanner input = new Scanner(System.in);

	public void aa() {

		System.out.println("\t\t我行我素管理系统");
		System.out.println("****************************");
		System.out.println("\t\t1:客户信息");
		System.out.println("\t\t2:真情回馈");
		System.out.println("****************************");
		System.out.println("请选择,输入0返回上一级");

		boolean f;
		do {
			int a = input.nextInt();
			f = false;
			if (a == 1) {
				cc();
			} else if (a == 2) {
				bb();
			} else if (a == 0) {
				dd();
			} else {
				System.out.println("输入错误!");
				f = true;
			}

		} while (f);

	}

	public void bb() {
		System.out.println("\t\t我行我素管理系统>真情回馈");
		System.out.println("****************************");
		System.out.println("\t\t1:幸运大放送");
		System.out.println("\t\t2:幸运抽奖");
		System.out.println("\t\t3:生日问候");
		System.out.println("****************************");
		System.out.println("请选择,输入0返回上一级");

		boolean f;
		do {
			int a = input.nextInt();
			f = false;
			if (a == 1) {
				System.out.println("幸运大放送");
			} else if (a == 2) {
				System.out.println("幸运抽奖");
			} else if (a == 3) {
				System.out.println("生日问候");
			} else if (a == 0) {
				aa();
			} else {
				System.out.println("输入错误,重新输入");
				f = true;
			}
		} while (f);

	}

	public void cc() {
		System.out.println("\t\t我行我素管理系统>客户信息");
		System.out.println("****************************");
		System.out.println("\t\t1:客户信息");
		System.out.println("****************************");
		System.out.println("请选择,输入0返回上一级");
		boolean f;
		do {
			int a = input.nextInt();// 这个要在循环里面
			f = false;
			if (a == 1) {
				System.out.println("客户信息");
			} else if (a == 0) {
				aa();
			} else {
				System.out.println("输入错误,重新输入");
				f = true;
			}
		} while (f);
	}

	public void dd() {
		System.out.println("\t\t欢迎使用我行我素购物管理系统");
		System.out.println("****************************");
		System.out.println("\t\t1:登陆");
		System.out.println("\t\t2:退出");
		System.out.println("****************************");
		System.out.println("请选择:");
		int a = input.nextInt();
		if (a == 1) {
			aa();
		} else if (a == 2) {
			System.out.println("退出");
		}
	}

}

 

import java.util.Scanner;


public class z2 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
		z1 a=new z1();
		System.out.println("\t\t欢迎使用我行我素购物管理系统");
		System.out.println("****************************");
		System.out.println("\t\t1:登陆");
		System.out.println("\t\t2:退出");
		System.out.println("****************************");
		System.out.println("请选择:");
		
		int shu=input.nextInt();
		if(shu==1){
		a.aa();
		}else {
			System.out.println("退出");
		}
	}}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值