From ce52191b217693cf4050ccd2219018c379d9c9eb Mon Sep 17 00:00:00 2001 From: ziyi105 Date: Mon, 13 Nov 2023 15:26:52 +0800 Subject: [PATCH] Update variable names --- src/main/java/seedu/cafectrl/data/CurrentDate.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/seedu/cafectrl/data/CurrentDate.java b/src/main/java/seedu/cafectrl/data/CurrentDate.java index 05a4e50339..3a0f502233 100644 --- a/src/main/java/seedu/cafectrl/data/CurrentDate.java +++ b/src/main/java/seedu/cafectrl/data/CurrentDate.java @@ -10,21 +10,21 @@ public class CurrentDate { private int currentDay; public CurrentDate() { - currentDay = ZERO; + currentDay = DAY_BASE_NUMBER; } public CurrentDate(int day) { - currentDay = day - ONE; + currentDay = day - DAY_OFFSET; } public CurrentDate(Sales sales) { setDate(sales); } public void nextDay() { - currentDay += ONE; + currentDay += DAY_OFFSET; } public void previousDay() { - currentDay -= ONE; + currentDay -= DAY_OFFSET; } public int getCurrentDay() { @@ -40,10 +40,10 @@ public void setDate(Sales sales) { ArrayList orderLists = sales.getOrderLists(); int orderListsSize = orderLists.size(); - if (orderListsSize > ZERO) { - currentDay = orderListsSize - ONE; + if (orderListsSize > MIN_ORDER_LIST_SIZE) { + currentDay = orderListsSize - ORDER_LIST_SIZE_OFFSET; } else { - currentDay = ZERO; + currentDay = DAY_BASE_NUMBER; } } }