Skip to content

Commit

Permalink
Merge pull request #151 from ICubE-/master
Browse files Browse the repository at this point in the history
Fix range of author tags
  • Loading branch information
ICubE- authored Nov 1, 2023
2 parents 0e2b28b + 5f23e35 commit 3987de0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/fittrack/MealList.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public void deleteMeal(int mealIndex) {
mealList.remove((mealIndex - 1));
mealListSize--;
}
// @@author

@Override
public String toString() {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/fittrack/command/DeleteMealCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ public CommandResult execute() {
mealList.deleteMeal(mealIndex);
return new CommandResult("I've deleted the following meal:" + "\n" + toDelete.toString());
}
// @@author

// @@author NgLixuanNixon
@Override
public void setArguments(String args, CommandParser parser)
throws PatternMatchFailException, NumberFormatException {
mealIndex = parser.parseIndex(args);
}
// @@author

@Override
protected String getHelp() {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/fittrack/command/DeleteWorkoutCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ public CommandResult execute() {
workoutList.deleteWorkout(workoutIndex);
return new CommandResult("I've deleted the following workout:" + "\n" + toDelete.toString());
}
// @@author

// @@author marklin2234
@Override
public void setArguments(String args, CommandParser parser)
throws PatternMatchFailException, NumberFormatException {
workoutIndex = parser.parseIndex(args);
}
// @@author

@Override
protected String getHelp() {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/fittrack/data/Bmi.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/fittrack/parser/CommandParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/test/java/fittrack/command/AddWorkoutCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ public void testHelp(){
assertEquals(AddWorkoutCommand.HELP, new AddWorkoutCommand("").getHelp());
}
}
// @@author

0 comments on commit 3987de0

Please sign in to comment.