[AY1920S1-CS2113T-W13-3] SGTravel#71
[AY1920S1-CS2113T-W13-3] SGTravel#71Jefferson111 wants to merge 801 commits intonusCS2113-AY1920S1:masterfrom
Conversation
|
@Sukrut1881 if this is your official PR to the upstream repo, please title it in English! |
src/main/java/duke/Main.java
Outdated
| mainWindow.show(); | ||
| mainWindow.initialise(this); | ||
| } catch (Exception e) { | ||
| e.printStackTrace(); |
There was a problem hiding this comment.
printing stacktrace is not good exception handling
| * Messages used by duke.Duke. | ||
| */ | ||
| public class Messages { | ||
| public static final String UNKNOWN_COMMAND = "☹ I'm sorry, but I don't know what that means :-("; |
There was a problem hiding this comment.
Need to follow naming convention here.
Think if you can categorize these commands in some way.
- are they related to a feature? if so can you name them as
Feature_<message type>_<variable> - are they related to a particular type of message? e.g. info, error, etc.,
| public static final String PROMPT_ERROR = "Sorry, but something went wrong..."; | ||
| public static final String PROMPT_TOO_MANY_ATTEMPTS = "Sorry, but you have exceeded 5 attempts..."; | ||
| public static final String PROMPT_SPACES = "Please do not include spaces in your search!"; | ||
| public static final String PROMPT_NOT_INT = "Please use a number!"; |
There was a problem hiding this comment.
Apply this convention above, can?
| @@ -0,0 +1,8 @@ | |||
| package duke.commons.enumerations; | |||
|
|
|||
| public enum Constraint { | |||
| * Enumerations for different specificity of time. | ||
| */ | ||
| public enum TimePatternType { | ||
| DAY_OF_WEEK, DATE_TIME, DATE, TIME |
There was a problem hiding this comment.
follow a standard convention to write enums.
| * URL request to OneMap API to get coordinates of location. | ||
| */ | ||
| public class LocationSearchUrlRequest extends UrlRequest { | ||
| private static final String paramType = "searchVal"; |
There was a problem hiding this comment.
variable name for "constants" don't follow the guideline
| } | ||
| return new CommandResultText(MESSAGE_BUS_ROUTE + result); | ||
|
|
||
| } catch (Throwable e) { |
There was a problem hiding this comment.
woah! waay too generic. please use specific exception class
| } | ||
|
|
||
| /** | ||
| * Executes this command on the given task list and user interface. |
There was a problem hiding this comment.
may want to say what command is "this command"
| import duke.logic.commands.results.CommandResultText; | ||
| import duke.model.Model; | ||
|
|
||
| public class PromptCommand extends Command { |
| @@ -0,0 +1,9 @@ | |||
| package duke.logic.commands.results; | |||
|
|
|||
| public abstract class CommandResult { | |||
There was a problem hiding this comment.
abstract classes MUST have header comments. it is like a contract between the component and the client class.
how will the client class implementer know what to expect without documentation?
|
|
||
| import javafx.scene.image.Image; | ||
|
|
||
| public interface Imageable { |
There was a problem hiding this comment.
We are unsure of how to name the interface, it is to mean the class that implements the interface should contains an Image and a method to get the image
|
|
||
| import duke.model.TaskList; | ||
|
|
||
| public interface Taskable { |
There was a problem hiding this comment.
We are unsure of how to name the interface, it is to mean the class that implements the interface should contains tasks and a method to get/set the tasks.
| /** | ||
| * Creates a Conversation object based on input. | ||
| * | ||
| * @param input The words from user input. |
There was a problem hiding this comment.
need to advertise the exception being thrown
| @@ -0,0 +1,70 @@ | |||
| package duke.model.transports; | |||
|
|
|||
| import duke.commons.enumerations.Constraint; | |||
There was a problem hiding this comment.
this part of the code looks well written 👍
| boolean isBusData = false; | ||
| while (s.hasNext()) { | ||
| String line = s.nextLine(); | ||
| if ("==========".equals(line)) { |
There was a problem hiding this comment.
?? any specific reason? do you want to document?
| import duke.model.events.Task; | ||
| import duke.model.events.TaskWithDates; | ||
| import duke.ui.UiPart; | ||
| import javafx.fxml.FXML; |
There was a problem hiding this comment.
give a line space to indicate logical grouping of imports.
|
|
||
| private LocationCard(Venue location) { | ||
| super(FXML); | ||
| double offsetY = 600 - ((location.getLatitude() - 1.218) * 600 / (1.486 - 1.218)); |
There was a problem hiding this comment.
can you make this size agnostic? things many not appear the same way on all resolution screens
@Sukrut1881
@hongchuan97
@Inno97
@Jefferson111