资源简介

吃货联盟订餐系统,我要订餐,查看餐袋,签收订单,删除订单,我要点赞,退出系统。 功能全,类似数据类型输入错误,数组越界,输入类型不匹配,输入数字不匹配,输入数字列表不存在等各种问题均以解决,功能全面,欢迎查阅~

资源截图

代码片段和文件信息

package OrderSystem_new;

import java.util.Scanner;
import java.util.Arrays;

public class A_orderFood extends Table implements Ishow {
    public static int number;
    public static int time;
    public static String address;
    public double allfoodOrderPrice=0;
    public static int No;

    public static String again;
    public static String allOrderfood[]=new String[100];
    public static int allOrderfoodnumber[]=new int[100];
    public static String allOrderfood_allOrderfoodnumber[]=new String[100];
    public static int againNumber=0;
    public static String findallOrderfood_allOrderfoodnumber[]=new String[100];
    @Override

    public void show() {
        if(delete!=88){
            reset_A();
        }
        Scanner Sc = new Scanner(System.in);
        System.out.println(“*****我要订餐*****“);
        System.out.println(“请输入订餐人姓名:“);
        name=Sc.next();
        vip++;
        orderPerson[vip-1 ]=name;
        System.out.println(“序号\t\t\t菜名\t\t\t单价\t\t\t点赞数“);
        for(int i=0;i<3;i++){
            System.out.println((i+1)+“\t\t\t“+foodName[i]+“\t\t\t“+foodPrice[i]+“\t\t\t“+goods[i]);
        }
        System.out.println(“请选择您要点的菜品编号:“);
        No=Sc.nextInt();
        if(No>3||No<1){
            do {
                System.out.println(“请输入正确序号(1-3)!“);
                No=Sc.nextInt();
            }while (No>3||No<1);
        }
        orderFood[vip-1]=foodName[No-1];
        System.out.println(“请选择您需要的份数:“);
        number=Sc.nextInt();
        orderNumber[vip-1]=number+“份“;
        allfoodOrderPrice+=number*foodPrice[No-1];
        again();
        System.out.println(“请输入送餐时间(送餐时间是10点至20点之间整数):“);
        System.out.println(“10-13点送餐费为2元,14-17点送餐费为3.5元,18-20点送餐费为2.5元“);
        time=Sc.nextInt();
        if(time>20||time<10){
            do {
                System.out.println(“请输入正确的送餐时间(送餐时间是10点至20点之间整数):“);
                System.out.println(“10-13点送餐费为2元,14-17点送餐费为3.5元,18-20点送餐费为2.5元“);
                time = Sc.nextInt();
            }while(time>20||time<10);
        }
        orderDate[vip-1]=time+“时“;
        double setGold=0;
        if(time<=13){
            setGold=2.0;
        }
        if(time>=14&&time<=17){
            setGold=3.5;
        }
        if(time>17){
            setGold=2.5;
        }
        System.out.println(“请输入送餐地址:“);
        address=Sc.next();
        orderAddress[vip-1]=address;
        System.out.println(“订餐成功!“);
        System.out.println(““);
        if(againNumber==0){
            allOrderfood_allOrderfoodnumber[0]=foodName[No-1]+number+“份“;
            System.out.println(“您订的是:“+foodName[No-1]+number+“份“);
            orderFood_orderNumber[vip-1]=orderFood[vip-1]+“ “+orderNumber[vip-1];
        }else{
            System.out.print(“您订的是:“);
            orderFood_orderNumber[vip-1]=““;
            //System.out.println(“您订的是:“+ Arrays.toString(allOrderfood_allOrderfoodnumber));
            for(int i=0;i<=

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件         82  2018-07-05 00:51  Ishow.java

     文件       3902  2018-07-08 09:43  Main.java

     文件       2057  2018-07-08 09:47  Table.java

     文件       5279  2018-07-08 09:43  A_orderFood.java

     文件        632  2018-07-08 09:05  B_orderingUtil.java

     文件       2382  2018-07-08 08:53  C_orderSign.java

     文件       2861  2018-07-08 08:53  D_deleteForm.java

     文件       1676  2018-07-08 09:19  E_plusGoods.java

----------- ---------  ---------- -----  ----

                18871                    8


评论

共有 条评论