太原理工大学软件java实验报告(21)
发布时间:2021-06-12
发布时间:2021-06-12
Goods goods_sals = new Goods();
System.out.println("请输入销售商品名称"); goods_sals.setName(readString()); do { try {
System.out.println("请输入销售商品价格");
goods_sals.setPrice(Integer.parseInt(readString())); i = 0; }
catch (Exception e) { i = 1;
System.err.println("输入有误"); } }
while (i != 0); do { try {
System.out.println("请输入销售商品数量");
goods_sals.setNumber(Integer.parseInt(readString())); i = 0; }
catch (Exception e) { i = 1;
System.err.println("输入有误"); } }
while (i != 0);
System.out.println(market.sale(goods_sals)); break; default:
System.out.println("退出"); break; } }
while (type != 0);
上一篇:宜春一对一辅导机构哪家好