package day06; import java.util.Scanner; public class 第一周综合案例 { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("欢迎来到订餐系统"); int num = 0;//循环变量 //菜单数组 String [] dishNames = {"红烧肉","鱼香肉丝","甜酸排骨","白切鸡"}; //菜单价格 double [] dishPrice = {42.5,25.8,45.0,66.8}; //点赞数 int [] priaiseNums = {12,45,76,45}; //订单 String [] names = new String[4];//姓名 String [] dishMegs = new String[4];//菜品 int [] times = new int[4];//时间 String [] addressea = new String[4];//地址 double [] sumPrices = new double[4];//总金额 int [] states = new int[4];//0已预定(默认),1已完成 //订单数 int sign = 0; //创建一个订单 names[0] = "张琴"; dishMegs[0] = "鱼香肉丝 2份"; times[0] = 12; addressea[0] = "永泰路13号"; sumPrices[0] = 51.6; states[0] = 1; do{ //显示菜单供选择 System.out.println("-------------------------"); System.out.println("1、我要订餐"); System.out.println("2、查看钱袋"); System.out.println("3、签收订单"); System.out.println("4、删除订单"); System.out.println("5、我要点赞"); System.out.println("6、退出系统"); System.out.println("-------------------------"); System.out.println("请选择:"); //获取输入的操作数字 int inNum = input.nextInt(); //根据菜单数字选择进行相应的跳转 switch (inNum){ case 1://订餐操作 System.out.println("---------1、我要订餐------"); System.out.println("序号\t\t菜名\t\t单价\t\t点赞数"); for (
订餐功能系统
最新推荐文章于 2024-09-03 20:17:53 发布