package chapter45;
public class consume45 {
public static void main(String[] args) {
//品秀
double pxPrice=10.05;
double pxCount=1.00;
String pxName=“品秀”;
double pxAmount=pxPrice*pxCount;
//康师傅水蜜桃
double mtPrice=3.00;
double mtCount=1.00;
String mtName="康师傅水蜜桃";
double mtAmount=mtPrice*mtCount;
//康师傅680杯面
double bmPrice=3.00;
double bmCount=1.00;
String bmName="康师傅680杯面";
double bmAmount=bmPrice*bmCount;
//列表顶部
System.out.println("学院超市西区店 NO 200943");
System.out.println("收银001 18/09/11 16:49:23");
System.out.println("------------------------------------------------------------");
//列表中部
System.out.println("编码名称 单价 数量 金额");
System.out.println(pxName+" "+pxPrice+" "+pxCount+" "+pxAmount );
System.out.println(mtName+" "+mtPrice+" "+mtCount+" "+mtAmount );
System.out.println(bmName+" "+bmPrice+" "+bmCount+" "+bmAmount );
System.out.println("------------------------------------------------------------");
//下部
double allCount=pxCount+mtCount+bmCount;//总数
double allAmount=pxAmount+mtAmount+bmAmount;//总额
System.out.println("****** 总数:"+allCount);
System.out.println("应收 "+allAmount+" 小计 "+allAmount);
System.out.println("收钱 16.5 找钱 0.00");
System.out.println("其中:现金付款16.5");
System.out.println("当日当次有效");
System.out.println("欢迎下次再来!");
}
}