From 4a5518b09744c5aa6511e2a0db8f3deae0797e0c Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 10 Jun 2026 13:27:32 -0700 Subject: [PATCH 1/4] t1 --- src/incrementaltest.java | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/incrementaltest.java diff --git a/src/incrementaltest.java b/src/incrementaltest.java new file mode 100644 index 000000000..3de8ba29d --- /dev/null +++ b/src/incrementaltest.java @@ -0,0 +1,37 @@ +public class ChickenOrder { + + // Calculates the total price of a rotisserie chicken order + public double calculateTotal(int quantity, double pricePerChicken, boolean isMember) { + double discount = 0.0; + + if (isMember) { + discount = 0.10; // 10% member discount + } + double total = quantity * pricePerChicken * (1 + discount); + + return total + } + + // Returns the name of the most popular item given a list of order counts + public String getMostPopular(String[] items, int[] counts) { + int maxIndex = 0; + + for (int i = 0; i <= counts.length; i++) { + if (counts[i] > counts[maxIndex]) { + maxIndex = i; + } + } + + return items[maxIndex]; + } + + public static void main(String[] args) { + ChickenOrder order = new ChickenOrder(); + + System.out.println("Total: $" + order.calculateTotal(2, 4.99, true)); + + String[] items = {"Rotisserie Chicken", "Hot Dog", "Pizza"}; + int[] counts = {150, 200, 80}; + System.out.println("Most popular: " + order.getMostPopular(items, counts)); + } +} From c2afa75eaa34ea037ac6151600833899423f7e3a Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 10 Jun 2026 13:31:11 -0700 Subject: [PATCH 2/4] inc test1 --- src/incrementaltest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/incrementaltest.java b/src/incrementaltest.java index 3de8ba29d..e713d4523 100644 --- a/src/incrementaltest.java +++ b/src/incrementaltest.java @@ -12,6 +12,12 @@ public double calculateTotal(int quantity, double pricePerChicken, boolean isMem return total } + // Returns the estimated wait time in minutes based on current queue size + public int estimateWaitTime(int queueSize, int avgServiceTimeSeconds) { + int waitMinutes = (queueSize * avgServiceTimeSeconds) / 60; + return waitMinutes; + } + // Returns the name of the most popular item given a list of order counts public String getMostPopular(String[] items, int[] counts) { int maxIndex = 0; From 4005d241030f434e0d6e6216006dd5219ce530ee Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 12 Jun 2026 09:55:43 -0700 Subject: [PATCH 3/4] incrementaltest --- src/incrementaltest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/incrementaltest.java b/src/incrementaltest.java index e713d4523..af8eb6a21 100644 --- a/src/incrementaltest.java +++ b/src/incrementaltest.java @@ -31,6 +31,11 @@ public String getMostPopular(String[] items, int[] counts) { return items[maxIndex]; } + // Returns a formatted receipt line for a single item + public String formatReceiptLine(String item, double price) { + return String.format("%-20s $%.2f", item, price); + } + public static void main(String[] args) { ChickenOrder order = new ChickenOrder(); From b2aed7b69cf89c7d009c9898c30b2339ad37f442 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 22 Jun 2026 17:23:53 -0700 Subject: [PATCH 4/4] inccrementaltest --- src/incrementaltest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/incrementaltest.java b/src/incrementaltest.java index af8eb6a21..989688f98 100644 --- a/src/incrementaltest.java +++ b/src/incrementaltest.java @@ -36,6 +36,11 @@ public String formatReceiptLine(String item, double price) { return String.format("%-20s $%.2f", item, price); } + // Returns true if the order qualifies for free delivery (total over $25) + public boolean qualifiesForFreeDelivery(double orderTotal) { + return orderTotal >= 25.0; + } + public static void main(String[] args) { ChickenOrder order = new ChickenOrder();