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

[Goh Ee Liang] iP #197

Open
wants to merge 66 commits into
base: master
Choose a base branch
from
Open

[Goh Ee Liang] iP #197

wants to merge 66 commits into from

Conversation

Elgoh
Copy link

@Elgoh Elgoh commented Aug 23, 2020

No description provided.

Copy link
Author

@Elgoh Elgoh left a comment

Choose a reason for hiding this comment

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

Thank you both for the reviews! Will continue to improve my codes. Yall can follow me back on GitHub!

*
* @param filePath takes in the filepath of the storage file.
*/
public Gel (String filePath) {
Copy link
Author

Choose a reason for hiding this comment

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

The constructor should be kept public because in the latest iteration, MainWindow creates a Gel object. But run() on the other hand should be private. Thanks for pointing this out!

* Ensures that user input of date and time is in the correct format.
* If is in the correct format, translate the string into <code>LocalDateTime</code>.
*
* @param dateTime User's input
Copy link
Author

Choose a reason for hiding this comment

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

Yup thanks!

* @throws IOException If file could not be updated.
*/
public static void parseUserInput(Scanner sc, Storage storage, Ui ui, TaskList taskList) throws IOException {
label:
Copy link
Author

Choose a reason for hiding this comment

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

Yes you are right! I have changed it to loop.

String keyword = inputArr[0];
try {
switch (keyword) {
case "bye": { //bye
Copy link
Author

Choose a reason for hiding this comment

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

Yea HAHA quite a useless comment indeed.

private String directoryPath;

/**
* Constructor of Storage class.
Copy link
Author

Choose a reason for hiding this comment

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

I think you are right. I have referred to the Java APIs and their constructors have descriptive Javadoc.

public void checkFileExistence() throws IOException {
File dataDir = new File(directoryPath);
if (!dataDir.exists()) {
boolean bool = dataDir.mkdir();
Copy link
Author

Choose a reason for hiding this comment

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

Yes, I have changed it to your suggestion. Thanks!

*/
public class TaskList {
private List<Task> listOfTasks;
private Ui ui;
Copy link
Author

Choose a reason for hiding this comment

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

You are right I will modify my code. Thank you for pointing this out!

private List<Task> listOfTasks;
private Ui ui;

public TaskList(Ui ui) {
Copy link
Author

Choose a reason for hiding this comment

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

Yes... I did not have the time to write them all, will do it soon!

System.out.println(" Hello! I'm Gel\n What do you want from me?\n");
}

public void farewellMessage() {
Copy link
Author

Choose a reason for hiding this comment

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

Yes, thank you!

Comment on lines 43 to 44
assertEquals("\n" +
" Your time has an invalid format... please use"
Copy link
Author

Choose a reason for hiding this comment

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

Yup! thanks!

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.

None yet

3 participants