Please re-enter your item ID. “);
85. keyboard.nextLine();
86. itemID = -1;
87. }
88.
89. } while (itemID != 0); //Check if exit condition has been met
90. if(totalAmount >= AMOUNT_TO_QUALIFY_FOR_DISCOUNT)
91. {
92. discountAmount = totalAmount * DISCOUNT_RATE;
93. }
94. else
95. {
96. discountAmount = 0;
97. }
98. System.out.println(“”);
99. System.out.println(“You selected “+itemCounter+” items to purchase.”);
100. System.out.println(“Your sales total $”+totalAmount);
101. System.out.println(“Your discount amount is $”+discountAmount);
102. System.out.println(“Your sales tax is $”+totalTax);
103. System.out.println(“The total amount due is $”+(totalAmount – discountAmount + totalTax));
104. System.out.println(“”);
105. }
106. }
Hi there! Click one of our representatives below and we will get back to you as soon as possible.