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

[kimberlybp] iP #245

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

Conversation

kimberlybp
Copy link

@kimberlybp kimberlybp commented Jan 25, 2023

Sirius

"Time is the scarcest resource and unless it is managed nothing else can be managed." - Peter Drucker (source)

Sirius is a CLI app that helps you manage your time. It's,

  • text-based
  • easy to use
  • FAST SUPER FAST to use

In order to use it..

  1. Download the JAR file from here
  2. Double-click it
  3. Add your tasks
  4. Let Sirius handle the rest! 😎

Features

  • List all your tasks
  • Manage Todos, Deadlines and Events
  • Reminders (Coming soon!)

Devs feel free and play around with the code

Here's a preview of the main method:

public static void main(String[] args) {
    new Duke(PATH).run();
}

Copy link

@Skeltons Skeltons left a comment

Choose a reason for hiding this comment

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

I've noticed that your Ui class is not being used properly as some classes are still printing to console without calling the Ui class. Overall, your code looks good to me!

this.value = value;
}

public boolean equals(String input) {
Copy link

Choose a reason for hiding this comment

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

Perhaps the methods should be called isEqual?

Copy link

Choose a reason for hiding this comment

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

I think isEqual is a good idea!

Comment on lines 3 to 5
import commands.*;
import exceptions.DukeException;
import tasks.*;
Copy link

Choose a reason for hiding this comment

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

Shouldn't wildcard imports be avoided?

Comment on lines 3 to 5
import tasks.*;

import java.io.*;
Copy link

Choose a reason for hiding this comment

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

Shouldn't wildcard imports be avoided?

Comment on lines 27 to 35
case "T":
initList.add(new Todo(taskDesc, isCompleted));
break;
case "D":
initList.add(new Deadline(taskDesc, isCompleted, strArr[3]));
break;
case "E":
initList.add(new Event(taskDesc, isCompleted, strArr[3], strArr[4]));
break;
Copy link

Choose a reason for hiding this comment

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

Shouldn't there be no indentation between switch and case?

import java.util.Scanner;

public class Duke {
private static final String PATH = "data/Duke.txt";
Copy link

Choose a reason for hiding this comment

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

Nice use of capitalization for constants

this.value = value;
}

public boolean equals(String input) {
Copy link

Choose a reason for hiding this comment

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

I think isEqual is a good idea!

}

public static Command parse(String input) throws DukeException {
String[] inputArr = input.split(" ", 2);
Copy link

Choose a reason for hiding this comment

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

Perhaps we can better understand this String array variable by naming it inputs or inputTokens?

throw new DukeException("Hey now.. The description of a deadline cannot be empty. >:(");
}
taskInput = inputArr[1];
String[] dArr = taskInput.split("/by", 2);
Copy link

Choose a reason for hiding this comment

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

The naming of this array might not be immediately evident on what it is supposed to be, because of the short name. Perhaps we can use a more precise name?

}

public List<Task> loadFile() throws Exception {
List<Task> initList = new ArrayList<>();
Copy link

Choose a reason for hiding this comment

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

Perhaps we can rename this Collection variable to be tasks as it is a collection of Tasks?

Previous build.gradle file had duke.Duke as mainClassName, however due to GUI addition to duke, it needs to be updated to duke.Launcher to launch GUI

Update mainClassName to duke.Launcher 

For JAR files to build and launch the main method of the correct class
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