Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
cbf3cd2
Add Greet
vincentlauhl Aug 18, 2021
91ce339
Add echo and method for printing output
vincentlauhl Aug 25, 2021
e4f50de
Add list keeping and list printing
vincentlauhl Aug 25, 2021
39dbc7c
Add Task class and Mark as Done feature
vincentlauhl Aug 25, 2021
b287fd9
Change taskList to tasks
vincentlauhl Aug 25, 2021
b6db002
Change constant to upper case
vincentlauhl Aug 27, 2021
ab47db6
Add Event, ToDo, Deadline class and TaskType enum.
vincentlauhl Sep 1, 2021
026be10
Add text UI testing
vincentlauhl Sep 1, 2021
5da062e
Update text ui test and done refactoring
vincentlauhl Sep 1, 2021
14a2865
Add exception handling and exception class
vincentlauhl Sep 8, 2021
8d6b1e5
Change input and expected text for ui test
vincentlauhl Sep 8, 2021
42969c1
Move classes into packages and update runtest.bat
vincentlauhl Sep 8, 2021
46c8930
Merge branch 'branch-Level-5'
vincentlauhl Sep 8, 2021
8493d64
Add package duke and update readme and runtest.bat
vincentlauhl Sep 10, 2021
974df0a
Merge branch 'branch-A-Packages'
vincentlauhl Sep 10, 2021
3dc210f
Change array to array list, tidy up code, and update text ui test.
vincentlauhl Sep 15, 2021
a9902e7
Add delete task and update text ui test
vincentlauhl Sep 15, 2021
7c89dda
Add save to file after termination and read from file when the progra…
vincentlauhl Sep 15, 2021
b9b174f
Merge branch 'branch-Level-6'
vincentlauhl Sep 15, 2021
c254470
Merge branch 'branch-Level-7'
vincentlauhl Sep 15, 2021
80a19f2
Add help message and add jar file
vincentlauhl Sep 15, 2021
c2ec413
Add classes for OOP with main code untouched
vincentlauhl Sep 25, 2021
bcb0f12
Update the code to have OOP style
vincentlauhl Sep 25, 2021
10ef049
Add date and time for event and deadline and some constants
vincentlauhl Sep 26, 2021
861e928
Add find function to find tasks containining the description
vincentlauhl Sep 26, 2021
d76441c
Add javadocs to most classes and methods
vincentlauhl Sep 27, 2021
f01e19e
Merge pull request #1 from vincentlauhl/branch-Level-8
vincentlauhl Sep 27, 2021
7200398
Merge branch 'master' into branch-Level-9
vincentlauhl Sep 27, 2021
c0a0767
Merge pull request #2 from vincentlauhl/branch-Level-9
vincentlauhl Sep 27, 2021
54f9efa
Merge branch 'master' into branch-A-JavaDoc
vincentlauhl Sep 27, 2021
ca92735
Merge pull request #3 from vincentlauhl/branch-A-JavaDoc
vincentlauhl Sep 27, 2021
45dc063
Update ReadMe file
vincentlauhl Sep 29, 2021
540a897
Do a minor change on the ReadMe file
vincentlauhl Sep 29, 2021
31cc2eb
Update ReadMe to correct GitHub Page ReadMe
vincentlauhl Sep 29, 2021
6f942e9
Correct GitHub Page ReadMe
vincentlauhl Sep 29, 2021
69ce26d
Correct GitHub Page not bolding words
vincentlauhl Sep 29, 2021
086b7ec
Correct GitHub Page not bolding words attempt 2.
vincentlauhl Sep 29, 2021
4663af3
Update doc/ReadMe and revert the other ReadMe. Update help mesage
vincentlauhl Sep 29, 2021
266610b
Slight change to doc/ReadMe
vincentlauhl Sep 29, 2021
c1dd736
Update code to adhere to coding standards. Update error message.
vincentlauhl Sep 29, 2021
2157f69
Include error handling for general errors in reading file
vincentlauhl Sep 29, 2021
4ebd498
Correction on reused code format
vincentlauhl Oct 5, 2021
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ bin/

/text-ui-test/ACTUAL.txt
text-ui-test/EXPECTED-UNIX.TXT
duke.txt
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Duke

* Duke helps you record your tasks and manage them.
* It is a CLI program, where you type in commands to the program.
* If you forget or are unsure about Duke's functions, enter **help** to learn how to use them.

## Functionalities
# 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.
Expand All @@ -13,12 +20,12 @@ Prerequisites: JDK 11, update Intellij to the most recent version.
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:
3. After that, locate the `src/main/java/duke/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
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
| |_| | |_| | < __/
|____/ \__,_|_|\_\___|
```
```
246 changes: 237 additions & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,256 @@

## Features

### Feature-ABC
### Add Task

Description of the feature.
Allows you to add different kinds of tasks such as ToDos, Deadlines and Events
* ToDo - A task that can be done anytime
* Deadline - A task that needs to be done before a certain time
* Events - A task that needs to be done at a certain period of time

### Feature-XYZ
### List

Description of the feature.
Shows you the list of tasks you have and their status of completion.

### Find

Allows you to find tasks with a specific description or date.

### Done

Allows you to mark a task as done

### Delete

Allows you to remove a task from the list

### Load

Loads tasks from the "duke.txt" file if it exists. Creates a new "duke.txt" file if it does not

### Save

Saves the tasks to the "duke.txt" file when the program is terminated

## Usage

### `Keyword` - Describe action
### `todo` - todo *description*

* Adds a ToDo task with its description to the list.
* If successful, the system will print out a success message, the task added, and the number of tasks in the list

Example of usage:

`todo read book`

Expected outcome:

* The success message is shown, along with the description of the task, the type of task added and the number of tasks in the list.

```
___________________________________________________________
I've added this to your list :D
[T][ ] read book
Now you have 1 task(s) in the list
___________________________________________________________
```

### `deadline` - deadline *description* /by *date*

* Adds a Deadline task with its description and the date and time of the deadline to the list.
* If successful, the system will print out a success message, the task added, and the number of tasks in the list.
* The date of deadline is in the format of *yyyy-MM-ddTHH:mm* , where *yyyy* is the year, *MM* is the month, *dd* is the day, *HH* is the hour and *mm* is the minute.

Example of usage:

`deadline finish homework /by 2021-09-30T23:00`

Expected outcome:

* The success message is shown, along with the description of the task, date and time of the deadline, the type of task added, and the number of tasks in the list.

```
___________________________________________________________
I've added this to your list :D
[D][ ] finish homework (by: Sep 30 2021 23:00)
Now you have 2 task(s) in the list
___________________________________________________________
```


### `event` - event *description* /at *start time* /to *end time*

* Adds an Event task with its description and the date and time of the event to the list.
* If successful, the system will return a success message, the task added, and the number of tasks in the list.
* The date and time of the start of the event should be added before */to* and the date and time of the end of the event should be added after */to*
* The date of deadline is in the format of *yyyy-MM-ddTHH:mm* , where *yyyy* is the year, *MM* is the month, *dd* is the day, *HH* is the hour and *mm* is the minute.

Example of usage:

`event celebrate birthday /at 2021-09-30T00:00 /to 2021-09-30T02:00`

Expected outcome:

* The success message is shown, along with the description of the task, date and time of the event, the type of task added, and the number of tasks in the list.

```
___________________________________________________________
I've added this to your list :D
[E][ ] celebrate birthday (at: Sep 30 2021 00:00 to Sep 30 02:00)
Now you have 3 task(s) in the list
___________________________________________________________
```

### `list` - list

* Displays the list of all tasks and their status of completion.

Example of usage:

`list`

Expected outcome:

* The list of tasks with their status of completion.
* If **X** appears in the second box, it means the task is completed.
* If the second box is empty, it means the task is not completed.

```
___________________________________________________________
Here are the things you need to do :
1.[T][ ] read book
2.[D][ ] finish homework (by: Sep 30 2021 23:00)
3.[E][ ] celebrate birthday (at: Sep 30 2021 00:00 to Sep 30 02:00)
___________________________________________________________
```

### `find` - find *keyword* **or** find /d *date*

* Searches through the list for tasks containing the keyword or with the same date, then displays all such tasks to the user if there is any.
* The date should be typed in the format of *yyyy-MM-dd* , where *yyyy* is the year, *MM* is the month and *dd* is the day

Example of usage:

1. `find read`
2. `find /d 2021-09-30`

Expected outcome:

1. A list of tasks containing the keyword given is shown to the user
2. A list of tasks with the same date is shown to the user

```
___________________________________________________________
Here are the matching tasks in your list :
1.[T][ ] read book
___________________________________________________________

___________________________________________________________
Here are the matching tasks in your list :
1.[D][ ] finish homework (by: Sep 30 2021 23:00)
2.[E][ ] celebrate birthday (at: Sep 30 2021 00:00 to Sep 30 02:00)
___________________________________________________________
```

### `done` - done *integer*

* Marks the task with the specific number on the list as done.
* If successful, the system will print out the task marked as done and the task will have an **X** in the second box.

Example of usage:

`done 1`

Expected outcome:

* The first task in the list is marked as done.

```
___________________________________________________________
You've completed the task! Well done!
[T][X] read book
___________________________________________________________
```

### `delete` - delete *integer*

* Deletes the task with the specific number on the list.
* If successful, the system will print out a success message, the deleted task, and the number of remaining tasks.

Example of usage:

`delete 1`

Expected outcome:

* The first task is deleted. The deleted task and the number of remaining tasks are shown.

```
___________________________________________________________
Alright, I've removed this task:
[T][X] read book
Now you have 2 task(s) in the list
___________________________________________________________
```

### `help` - help

* Asks Duke to show the list of commands.

Example of usage:

`help`

Expected outcome:
* The list of all the commands is printed out.

```
___________________________________________________________
list
- Shows you the list of tasks you have

todo (description)
- Saves a general todo task

deadline (description) /by yyyy-MM-ddTHH:mm
- Saves a task with a given deadline
- yyyy is the year, MM is the month, dd is the day, HH is the hour,
and mm is the minute

event (description) /at yyyy-MM-ddTHH:mm /to yyyy-MM-ddTHH:mm
- Saves an event happening at a certain time period
- yyyy is the year, MM is the month, dd is the day, HH is the hour,
and mm is the minute

delete (integer)
- Deletes a task with the corresponding number on the list

done (integer)
- Marks the task with the corresponding number as done

find (keyword)
- Finds tasks that contains the String given

find /d yyyy-MM-dd
- Finds tasks with the same date as the date given
- yyyy is the year, MM is the month and dd is the day
___________________________________________________________
```

### `bye` - bye

Describe the action and its outcome.
* Terminates the program and saves the tasks to the file "duke.txt".

Example of usage:

`keyword (optional arguments)`
`bye`

Expected outcome:

Description of the outcome.
* The exit message is printed.

```
expected output
___________________________________________________________
Bye, hope to see you again soon! :)
___________________________________________________________
```
10 changes: 0 additions & 10 deletions src/main/java/Duke.java

This file was deleted.

3 changes: 3 additions & 0 deletions src/main/java/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: duke.Duke

Loading