import java.util.Scanner;
public class Main {
public static void main(String[] args) {
boolean flag=true;
String mingcheng="";
String jiage="";
String kucun="";
String bianhao="";
String shangpin="";
String shuliang="";
do {
System.out.println("欢迎使用前程商城后台管理系统");
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("请选择要执行的操作:");
Scanner scanner=new Scanner(System.in);
int guanli = scanner.nextInt();
switch (guanli){
case 1:
System.out.println("查看商品信息");
System.out.println("编号\t\t名称\t\t价格\t\t库存\t\t售出");
System.out.println("1\t\t小米9\t2700.0\t60\t\t0");
System.out.println("2\t\t小米8\t2700.0\t40\t\t0");
System.out.println("3\t\tRedmi7\t2700.0\t80\t\t0");
System.out.println("4\t\t小米6x\t2700.0\t100\t\t0");
break;
case 2:
System.out.println("新增商品信息");
System.out.println("请输入商品名称:");
mingcheng=scanner.next();
System.out.println("请输入价格:");
jiage=scanner.next();
System.out.println("请输入库存:");
kucun=scanner.next();
break;
case 3:
System.out.println("删除商品信息");
System.out.println("请输入商品编号:");
bianhao=scanner.next();
System.out.println("删除成功!");
break;
case 4:
System.out.println("卖出商品");
System.out.println("请输入你要卖出的商品名称:");
shangpin=scanner.next();
System.out.println("请输入你要卖出的数量:");
shuliang=scanner.next();
System.out.println("卖出商品成功!");
break;
case 5:
System.out.println("商品销售排行榜");
System.out.println("***************************");
System.out.println("名次\t\t销售数量\t\t商品名称");
System.out.println("1\t\t2\t\t\tRedmi7");
System.out.println("2\t\t0\t\t\t小米9");
System.out.println("3\t\t0\t\t\t小米6x");
System.out.println("4\t\t0\t\t\t小米7");
break;
case 6:
System.out.println("谢谢使用!");
flag=false;
break;
default:
System.out.println("输入不符合要求,请重新输入!");
break;
}
}while (flag);
}
}