// Miya Natsuhara // 06-28-2019 // CSE142 // TA: Grace Hopper // This program calculates the bill for a coffee run made fo the some of your TAs. // It includes a 9.5% tax, and a 5% "preferred customer" discount. /* DEVELOPMENT NOTES: ((Note: this is not something you should include in your own programs; this is included here to aid in your understanding and to provide additional context for the program.)) Note that we use variables to capture repeated expressions (reducing redundancy) as well as improving readability by creating variables for the prices of different drinks, even though they are only used once! */ public class CoffeeOrder { public static void main(String[] args) { // latte ($5.50), frappuccino ($6.25), drip ($2.00) // Alex: latte, Anjali: frap, Jeremy: latte, Mino: drip double lattePrice = 5.50; double frapPrice = 6.25; double dripPrice = 2.00; int numLatte = 2; double subtotal = numLatte * lattePrice + frapPrice + dripPrice; double tax = subtotal * 0.095; double discount = subtotal * 0.05; System.out.println("Subtotal: $" + subtotal); System.out.println("Tax: $" + tax); System.out.println("Discount: ($" + discount + ")"); System.out.println("TOTAL: $" + (subtotal- discount + tax)); } }