Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0d5d223
Update name and add greeting
Aug 24, 2023
68f2743
Add echo function and exit functionality
Aug 29, 2023
d49c61b
Add list functionality and improve structure
Aug 29, 2023
93a262a
Add task completion feature
Aug 29, 2023
0160070
Add Todo, Deadline, and Event functionality
Sep 5, 2023
39066db
Modularise code and handle errors
Sep 13, 2023
1e8e89c
Handle blank input
Sep 13, 2023
7497866
Merge branch 'branch-Level-5'
Sep 13, 2023
53fe1c1
Update logo and README
Sep 13, 2023
573753f
Divide classes into packages
Sep 13, 2023
2f26c3e
Merge branch 'branch-A-Packages'
Sep 13, 2023
d4a0275
Add delete functionality
Sep 19, 2023
7d83a76
Add functionality to auto-load from save file
Oct 3, 2023
94e3ec6
Add automatic local save of newly added tasks
Oct 3, 2023
a0d2920
Merge branch-Level-7
Oct 3, 2023
e7544e2
Extract storage functionality into HerbertReader class
Oct 4, 2023
97df355
Extract UI and parsing functionality
Oct 4, 2023
cf187a1
Rename and refactor packages
Oct 4, 2023
5abc26c
Add JavaDoc comments
Oct 4, 2023
70bf7fe
Add dates to deadlines and events
Oct 4, 2023
4e07a60
Add search functionality for tasks
Oct 4, 2023
3cafb52
Add "find" to list of commands
Oct 4, 2023
b7a2649
Update documentation regarding dates
Oct 4, 2023
09561d8
Merge pull request #1 from antrikshdhand/branch-Level-8
antrikshdhand Oct 4, 2023
82dea9e
Merge branch 'master' into branch-Level-9
antrikshdhand Oct 4, 2023
91935c9
Merge pull request #2 from antrikshdhand/branch-Level-9
antrikshdhand Oct 4, 2023
a374ae0
Update Javadoc comments
Oct 4, 2023
5658758
Update User Guide
Oct 5, 2023
927be26
Update README.md
Oct 5, 2023
3c37c92
Fix save functionality on deletion and update of tasks
Oct 5, 2023
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT

# Ignore .class files
*.class
74 changes: 50 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,50 @@
# Duke project template

This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it.

## Setting up in Intellij

Prerequisites: JDK 11, update Intellij to the most recent version.

1. Open Intellij (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project first)
1. Open the project into Intellij as follows:
1. Click `Open`.
1. Select the project directory, and click `OK`.
1. If there are any further prompts, accept the defaults.
1. Configure the project to use **JDK 11** (not other versions) as explained in [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk).<br>
In the same dialog, set the **Project language level** field to the `SDK default` option.
3. After that, locate the `src/main/java/Duke.java` file, right-click it, and choose `Run Duke.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output:
```
Hello from
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
| |_| | |_| | < __/
|____/ \__,_|_|\_\___|
```
# Project Herbert

```
__ __ _______ ______ _______ _______ ______ _______
| | | || || _ | | _ || || _ | | |
| |_| || ___|| | || | |_| || ___|| | || |_ _|
| || |___ | |_||_ | || |___ | |_||_ | |
| || ___|| __ || _ | | ___|| __ | | |
| _ || |___ | | | || |_| || |___ | | | | | |
|__| |__||_______||___| |_||_______||_______||___| |_| |___|
```

Welcome to Herbert, the newest and friendliest AI assistant on the market.


## Commands

```
* list
List all current tasks.
Usage: list

* mark
Mark a task as completed.
Usage: mark <task number>

* unmark
Mark a task as incomplete.
Usage: unmark <task number>

* todo
Add a new todo to your list of tasks.
Usage: todo <task description>

* deadline
Add a new deadline to your list of tasks.
Usage: deadline <task description> /by <due date>

* event
Add a new event to your list of tasks.
Usage: event <task description> /from <start> /to <end>

* help
Show this help menu.
Usage: help

* bye
Exit the Herbert application.
Usage: bye
```
10 changes: 0 additions & 10 deletions src/main/java/Duke.java

This file was deleted.

68 changes: 68 additions & 0 deletions src/main/java/duke/Command.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package duke;

public enum Command {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why the choice to use enum?

LIST {
@Override
public String toString() {
return "\tList all current tasks."
+ System.lineSeparator()
+ "\tUsage: list";
}
},
MARK {
@Override
public String toString() {
return "\tMark a task as completed."
+ System.lineSeparator()
+ "\tUsage: mark <task number>";
}
},
UNMARK {
@Override
public String toString() {
return "\tMark a task as incomplete."
+ System.lineSeparator()
+ "\tUsage: unmark <task number>";
}
},
TODO {
@Override
public String toString() {
return "\tAdd a new todo to your list of tasks."
+ System.lineSeparator()
+ "\tUsage: todo <task description>";
}
},
DEADLINE {
@Override
public String toString() {
return "\tAdd a new deadline to your list of tasks."
+ System.lineSeparator()
+ "\tUsage: deadline <task description> /by <due date>";
}
},
EVENT {
@Override
public String toString() {
return "\tAdd a new event to your list of tasks."
+ System.lineSeparator()
+ "\tUsage: event <task description> /from <start> /to <end>";
}
},
HELP {
@Override
public String toString() {
return "\tShow this help menu."
+ System.lineSeparator()
+ "\tUsage: help";
}
},
BYE {
@Override
public String toString() {
return "\tExit the Herbert application."
+ System.lineSeparator()
+ "\tUsage: bye";
}
}
}
7 changes: 7 additions & 0 deletions src/main/java/duke/DukeException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package duke;

public class DukeException extends Exception {
public DukeException(String errorMessage) {
super(errorMessage);
}
}
Loading