From 5f23e358c94450dcb101eb6e056a34587326d075 Mon Sep 17 00:00:00 2001 From: ICubE- Date: Wed, 1 Nov 2023 13:11:22 +0800 Subject: [PATCH] Fix range of author tags --- src/main/java/fittrack/MealList.java | 1 + src/main/java/fittrack/command/DeleteMealCommand.java | 2 ++ src/main/java/fittrack/command/DeleteWorkoutCommand.java | 2 ++ src/main/java/fittrack/data/Bmi.java | 1 + src/main/java/fittrack/parser/CommandParser.java | 1 + src/test/java/fittrack/command/AddWorkoutCommandTest.java | 1 + 6 files changed, 8 insertions(+) diff --git a/src/main/java/fittrack/MealList.java b/src/main/java/fittrack/MealList.java index 177e6a8b96..451ee8d51d 100644 --- a/src/main/java/fittrack/MealList.java +++ b/src/main/java/fittrack/MealList.java @@ -28,6 +28,7 @@ public void deleteMeal(int mealIndex) { mealList.remove((mealIndex - 1)); mealListSize--; } + // @@author @Override public String toString() { diff --git a/src/main/java/fittrack/command/DeleteMealCommand.java b/src/main/java/fittrack/command/DeleteMealCommand.java index 06838f1efe..e14390dc63 100644 --- a/src/main/java/fittrack/command/DeleteMealCommand.java +++ b/src/main/java/fittrack/command/DeleteMealCommand.java @@ -32,6 +32,7 @@ public CommandResult execute() { mealList.deleteMeal(mealIndex); return new CommandResult("I've deleted the following meal:" + "\n" + toDelete.toString()); } + // @@author // @@author NgLixuanNixon @Override @@ -39,6 +40,7 @@ public void setArguments(String args, CommandParser parser) throws PatternMatchFailException, NumberFormatException { mealIndex = parser.parseIndex(args); } + // @@author @Override protected String getHelp() { diff --git a/src/main/java/fittrack/command/DeleteWorkoutCommand.java b/src/main/java/fittrack/command/DeleteWorkoutCommand.java index b35afc1b84..1a79f47311 100644 --- a/src/main/java/fittrack/command/DeleteWorkoutCommand.java +++ b/src/main/java/fittrack/command/DeleteWorkoutCommand.java @@ -32,6 +32,7 @@ public CommandResult execute() { workoutList.deleteWorkout(workoutIndex); return new CommandResult("I've deleted the following workout:" + "\n" + toDelete.toString()); } + // @@author // @@author marklin2234 @Override @@ -39,6 +40,7 @@ public void setArguments(String args, CommandParser parser) throws PatternMatchFailException, NumberFormatException { workoutIndex = parser.parseIndex(args); } + // @@author @Override protected String getHelp() { diff --git a/src/main/java/fittrack/data/Bmi.java b/src/main/java/fittrack/data/Bmi.java index 2b2a227b20..994f4fd06e 100644 --- a/src/main/java/fittrack/data/Bmi.java +++ b/src/main/java/fittrack/data/Bmi.java @@ -12,6 +12,7 @@ public class Bmi { Bmi(double bmi) { this.value = bmi; } + // @@author public Bmi(Height height, Weight weight) { assert (height != null && height.value > 0 && weight != null); diff --git a/src/main/java/fittrack/parser/CommandParser.java b/src/main/java/fittrack/parser/CommandParser.java index 7e3b4f6bff..7eef3f9f7d 100644 --- a/src/main/java/fittrack/parser/CommandParser.java +++ b/src/main/java/fittrack/parser/CommandParser.java @@ -248,6 +248,7 @@ public int parseIndex(String meal) throws PatternMatchFailException, NumberForma throw new NumberFormatException(); } } + // @@author public Date parseDate(String date) throws PatternMatchFailException { final Matcher matcher = DATE_PATTERN.matcher(date); diff --git a/src/test/java/fittrack/command/AddWorkoutCommandTest.java b/src/test/java/fittrack/command/AddWorkoutCommandTest.java index 6066be458a..479f50ae05 100644 --- a/src/test/java/fittrack/command/AddWorkoutCommandTest.java +++ b/src/test/java/fittrack/command/AddWorkoutCommandTest.java @@ -27,3 +27,4 @@ public void testHelp(){ assertEquals(AddWorkoutCommand.HELP, new AddWorkoutCommand("").getHelp()); } } +// @@author