Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix range of author tags #151

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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