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

[Kairos Koh] iP #189

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
98e53ab
Add Level 0. Greet (greets user and exits)
kairoskoh Aug 19, 2021
e0d5c4d
Add Level 1. Greet, Echo, Exit
kairoskoh Aug 25, 2021
ca6b0fe
Add Level-2. Add, List
kairoskoh Aug 25, 2021
13d9a37
Add Task.java
kairoskoh Aug 25, 2021
9dcbc95
Add Level 3. Mark as Done
kairoskoh Aug 25, 2021
c3d9af5
Add fixes to some exception inputs
kairoskoh Aug 25, 2021
72f7593
Add Deadline.java
kairoskoh Sep 1, 2021
1e289bf
Add Level 4. ToDos, Events, Deadlines
kairoskoh Sep 1, 2021
7b50777
Improve Code Quality
kairoskoh Sep 1, 2021
af71eb3
Add IllegalTaskException.java
kairoskoh Sep 8, 2021
6c57ecf
Add duke package
kairoskoh Sep 8, 2021
e8d8f41
Add Level 6. Delete and A-Collections
kairoskoh Sep 15, 2021
11315c6
Add DukeTaskData.txt
kairoskoh Sep 15, 2021
7c26728
Add minor changes to error message
kairoskoh Sep 15, 2021
3cf54db
Add minimal OOP classes
kairoskoh Sep 29, 2021
15d6adf
Make the code more OOP
kairoskoh Sep 29, 2021
57d09ac
Add file to ignore
kairoskoh Sep 29, 2021
eac25f9
Add function to find a task by searching for a keyword
kairoskoh Sep 29, 2021
c41f3af
Add JavaDoc
kairoskoh Sep 29, 2021
b8098ba
Add find functions
kairoskoh Sep 29, 2021
dfb01a0
Merge pull request #1 from kairoskoh/branch-Level-9
kairoskoh Sep 29, 2021
972d782
Add JavaDoc
kairoskoh Sep 29, 2021
663b585
Merge pull request #2 from kairoskoh/branch-A-JavaDoc
kairoskoh Sep 29, 2021
e41e1f4
Add Level 5
kairoskoh Sep 29, 2021
bc60895
Add Level 6
kairoskoh Sep 29, 2021
b2b063c
Add Level 7
kairoskoh Sep 29, 2021
253abe3
Merge pull request #3 from kairoskoh/branch-Level-5
kairoskoh Sep 29, 2021
4780c7e
Merge pull request #4 from kairoskoh/branch-Level-6
kairoskoh Sep 29, 2021
411c77a
Merge pull request #5 from kairoskoh/branch-Level-7
kairoskoh Sep 29, 2021
493ebcc
Add user guide
kairoskoh Sep 29, 2021
7db017f
Add more JavaDoc
kairoskoh Sep 29, 2021
2ac4093
Fix minor bug when saving tasks
kairoskoh Sep 29, 2021
0da697a
Remove hard-coded file paths
kairoskoh Sep 29, 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
src/main/java/META-INF/MANIFEST.MF
Empty file added DukeTaskData.txt
Empty file.
181 changes: 172 additions & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,191 @@

## Features

### Feature-ABC
### 1. Add and Delete Tasks

Description of the feature.
There are three different types of tasks that can be tracked -
todo, deadline and event.

### Feature-XYZ
### 2. List Tasks

Description of the feature.
A list of all the tasks will show. Details such as
which category of task, completion of task and description
of tasks will be shown.

### 3. Complete Tasks

Once you are done with a task, you can mark
the task as completed.

### 4. Find Tasks

Search for tasks with a certain keyword. This
will allow you to see specific tasks that
contains the keyword of your choice.

## Usage

### `Keyword` - Describe action
### `todo` - Adds todo task

Describe the action and its outcome.
Begin your input with a 'todo' followed by
the description of the todo task.

Example of usage:

`keyword (optional arguments)`
`todo borrow book`

Expected outcome:

A new todo task with the corresponding description
will be added.

```
--------------------
Got it. I've added this task:
[T] [ ] borrow book
Now you have 1 tasks in the list.
--------------------
```
### `deadline` - Adds deadline task

Begin your input with a 'deadline' followed by
the description of the deadline task. Remember to include '/by'
followed by the deadline description at the end.

Example of usage:

`deadline return book /by tonight`

Expected outcome:

Description of the outcome.
A new deadline task with the corresponding description
and deadline will be added.

```
expected output
--------------------
Got it. I've added this task:
[D] [ ] return book (by: tonight)
Now you have 1 tasks in the list.
--------------------
```
### `event` - Adds event task

Begin your input with a 'event' followed by
the description of the event task. Remember to include '/at'
followed by the event timing description at the end.

Example of usage:

`event library party /at tonight 10pm`

Expected outcome:

A new event task with the corresponding description
and event timing will be added.

```
--------------------
Got it. I've added this task:
[E] [ ] library party (at: tonight 10pm)
Now you have 1 tasks in the list.
--------------------
```
### `delete` - Deletes a task

Removes a specific task from the list.

Example of usage:

`delete 1`

Expected outcome:

A specified task will be removed.

```
--------------------
Noted. I've removed this task:
1.[ ] library party
Now you have 0 tasks in the list.
--------------------
```
### `list` - Lists all tasks

A list of all tasks will be shown.

Example of usage:

`list`

Expected outcome:

A list of all tasks will be shown according to
the sequence that they were added.

```
--------------------
Here are the tasks in your list:
1.[T] [ ] eat meat
2.[D] [ ] drink water (by: tonight)
3.[E] [ ] workout (at: midnight)
--------------------
```
### `done` - Mark a task as completed

A specified task will be marked as completed.

Example of usage:

`done 1`

Expected outcome:

A specified task will be marked as completed. This
task will still remain on the list.

```
--------------------
Nice! I've marked this task as done:
1.[X] eat meat
--------------------
```
### `find` - Find tasks containing keyword

All tasks in the list containing the specific
keyword will be shown.

Example of usage:

`find water`

Expected outcome:

All tasks in the list containing the specific
keyword will be shown.

```
--------------------
Here are the matching tasks in your list:
2.[D] [ ] drink water (by: tonight)
--------------------
```
### `bye` - Terminates program safely

Duke will be terminated safely.

Example of usage:

`bye`

Expected outcome:

A goodbye message will be shown.

```
--------------------
Bye. Hope to see you again soon!

--------------------
```


10 changes: 0 additions & 10 deletions src/main/java/Duke.java

This file was deleted.

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

import duke.processes.Parser;
import duke.processes.Storage;
import duke.processes.TaskList;
import duke.processes.Ui;

import java.io.IOException;
import java.util.Scanner;

public class Duke {

public static void main(String[] args) throws IOException {
TaskList tasks = new TaskList();
Storage.loadTasks(tasks);
Ui.printWelcomeMessage();
activeChat(tasks);
Storage.saveTasks(tasks);
Ui.printGoodbyeMessage();
}

private static void activeChat(TaskList tasks) {
boolean isBye = false;
String input;
Scanner in = new Scanner(System.in);
while(!isBye){
//store input into String
input = in.nextLine();
//process input
isBye = Parser.processInput(tasks, input);
}
}

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

public class IllegalTaskException extends Exception{
}
Loading