Skip to content

[CS2113-F14-3] VoyaTrip#39

Open
Lyam-T wants to merge 557 commits into
nus-cs2113-AY2425S2:masterfrom
AY2425S2-CS2113-F14-3:master
Open

[CS2113-F14-3] VoyaTrip#39
Lyam-T wants to merge 557 commits into
nus-cs2113-AY2425S2:masterfrom
AY2425S2-CS2113-F14-3:master

Conversation

@Lyam-T

@Lyam-T Lyam-T commented Feb 22, 2025

Copy link
Copy Markdown

No description provided.

Ashertan256 added a commit to Ashertan256/tp that referenced this pull request Mar 20, 2025
Hamdhan Junit tests and add assert statements

@thomasjlalba thomasjlalba left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work thus far everyone, only have a few really minor suggestions, but I especially like the abstraction to smaller and simpler methods

Comment on lines +45 to +47
} else {
return "~/" + currentTrip + "/" + currentTarget + " >";
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the else statement is redundant, given it is a return statement.

}

private ArrayList<String> extractCommandArguments(String command) throws InvalidCommand {
String[] doubleHyphenSeparatedTokens = command.strip().split("(^--|\\s+--)(?=\\w+\\s+\\w+)");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be good to refactor the regex to make it more understandable and less of a magic literal

Comment thread src/main/java/voyatrip/Trip.java Outdated
Comment on lines +110 to +111
Ui.printDeleteAccommodationMessage(accommodations.get(index - 1));
accommodations.remove(index - 1);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be clearer if you indicate with a comment why it is index - 1

Comment thread src/main/java/voyatrip/Trip.java Outdated
}
Transportation newTransportation = new Transportation(transportName, transportMode, transportBudget);
transportations.add(newTransportation);
Ui.printAddTransportationMessage(newTransportation);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work on refactoring the magic strings!

Comment thread src/main/java/voyatrip/Trip.java Outdated
}
}

public String abbrInfo() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is a personal preference, but maybe a more meaningful method name could be used like printAbbreviatedInfo (if I understand the method's intention correctly).

Comment thread src/main/java/voyatrip/Trip.java Outdated
StringBuilder tripInfo = new StringBuilder();
tripInfo.append(abbrInfo()).append("\n");

tripInfo.append("Itinerary:\n");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can look to refactor this magic string

Comment on lines +95 to +99
case "add", "a", "make", "mk" -> CommandAction.ADD;
case "delete", "d", "remove", "rm" -> CommandAction.DELETE_BY_INDEX;
case "list", "l" -> CommandAction.LIST;
case "cd" -> CommandAction.CHANGE_DIRECTORY;
case "exit", "quit", "bye" -> CommandAction.EXIT;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can refactor the magic strings to make it clearer, esp for the short forms like l or d

je-nnyt and others added 28 commits April 3, 2025 17:10
…mmodation

Dev/101 Modification of accommodation
Start and end day were not properly set causing program to crash.
Verify if start and end day are null to avoid program crashing.
start and end day cannot be null otherwise they will throw InvalidCommand contradicting assertDoesNotThrow
# Conflicts:
#	src/main/java/voyatrip/VoyaTrip.java
# Conflicts:
#	src/main/java/voyatrip/Trip.java
Dev/127 Add purposed storage system sequence diagram
Thomas Chiu and others added 30 commits April 8, 2025 11:19
# Conflicts:
#	docs/DeveloperGuide.md
# Conflicts:
#	docs/UserGuide.md
* master: (26 commits)
  Fix invalid portfolio path
  Fix: indentation
  Fix: table of contents not showing properly
  UserGuide.md: Change error message order
  Add clarification for table of contents
  Fix merge conflicts
  Update user guide
  Move PlantUML section in DG
  Apply format changes
  Update project description in PPP
  Apply final changes
  Update RepoSense link
  Update portfolio link
  Finalise DG documentation of modifyAccommodation
  Fix coding style
  Update DG
  Add table of cotent
  Update product profiles
  DG update
  Remove empty lines
  ...
Fix/253 Restructure the main readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants