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

[John Toh] iP #62

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
aae34ba
Add Increment: Level-0
jjtoh Aug 18, 2022
5701ddc
Add Level-1
jjtoh Aug 18, 2022
ba4ed0c
"Add Level-2"
jjtoh Aug 19, 2022
2ab974a
Add Level-3
jjtoh Aug 20, 2022
8df32c3
Add A-CodingStandard
jjtoh Aug 24, 2022
e832747
Add new java classes for level 4
jjtoh Aug 29, 2022
751198d
Add some incomplete code for level 4
jjtoh Aug 30, 2022
ace71c1
Add Level-4 with some improvements to code quality
jjtoh Aug 31, 2022
5b1fa36
Add test cases
jjtoh Aug 31, 2022
efd57f2
Change expected output
jjtoh Sep 1, 2022
7b0ca7f
Add Level-5 and A-Exception
jjtoh Sep 7, 2022
ae8e7eb
Add A-Packages
jjtoh Sep 7, 2022
3ff482f
Add some temporary code
jjtoh Sep 13, 2022
eaa8d40
Add ability to delete
jjtoh Sep 13, 2022
3e345a1
Shift some code around
jjtoh Sep 14, 2022
86eff83
Shift some code around
jjtoh Sep 14, 2022
bc967b5
Merge branch 'temp' into Level-6
jjtoh Sep 14, 2022
3371288
Merge tag 'Level-6'
jjtoh Sep 14, 2022
3ea3669
Add Level-7
jjtoh Sep 15, 2022
94554ee
Add jar file
jjtoh Sep 15, 2022
f143ba1
Revert "Add Level-7"
jjtoh Sep 15, 2022
2de3c38
Merge commit '94554eeda815c2da603e1e0fbba5846a9b718994' into Level-7
jjtoh Sep 15, 2022
e06c4e3
Add level 7
jjtoh Sep 15, 2022
f56c210
Add jar file
jjtoh Sep 15, 2022
8e3a781
Add more OOP
jjtoh Sep 28, 2022
9413857
Add Level 9
jjtoh Sep 28, 2022
63c2c4a
Merge pull request #1 from jjtoh/Level-9
jjtoh Sep 28, 2022
d0aba84
Add JavaDoc
jjtoh Sep 28, 2022
62d50db
Merge pull request #2 from jjtoh/A-JavaDoc
jjtoh Sep 28, 2022
9a13001
Update README.md
jjtoh Sep 28, 2022
bef3c36
Update some code logic
jjtoh Sep 28, 2022
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
Empty file added data/tasks.txt
Empty file.
169 changes: 157 additions & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,174 @@
# User Guide
Duke is a robot that allows you to track tasks. These tasks can be in either Todos, Deadlines or Events.
You can also get your tasks in a .txt file for you to do whatever you want with it!
## Features
- [Adding a Todo: todo](#adding-a-todo-todo)
- [Adding a Deadline: deadline](#adding-a-deadline-deadline)
- [Adding an Event: event](#adding-an-event-event)
- [Marking a Task: mark](#marking-a-task-mark)
- [Unmarking a Task: unmark](#unmarking-a-task-unmark)
- [Deleting a Task: delete](#deleting-a-task-delete)
- [View all tasks: list](#view-all-tasks-list)
- [Exiting the program: bye](#exiting-the-program-bye)

## Features
### Adding a Todo: `todo`
Adds a Todo to the list

### Feature-ABC
Use the command:

Description of the feature.
`todo sometask`

### Feature-XYZ
Example of Usage:

Description of the feature.
`todo Math Tutorial`

## Usage
Expected outcome:

```
-------------------------------------
Got it. I have added this task:
[T][ ] Math Tutorial
You now have 1 tasks.
-------------------------------------
```

### Adding a Deadline: `deadline`
Adds a Deadline to the list

Use the command:

`deadline sometask /by somedate`

Example of Usage:

`deadline Group Project /by Friday`

Expected outcome:

```
-------------------------------------
Got it. I have added this task:
[D][ ] Group Project (by: Friday)
You now have 2 tasks.
-------------------------------------
```

### Adding an Event: `event`
Adds an Event to the list

Use the command:

`event sometask /at somedate`

Example of Usage:

`event Concert /at Sunday 1900`

Expected outcome:

```
-------------------------------------
Got it. I have added this task:
[E][ ] Concert (at: Sunday 1900)
You now have 3 tasks.
-------------------------------------
```

### Marking a Task: `mark`

Marks a task.

Use the command:

`mark index`

Example of usage:

`mark 2`

Expected outcome:

```
-------------------------------------
Marked the following task:
[D][X] Group Project (by: Friday)
-------------------------------------
```

### Unmarking a Task: `unmark`

### `Keyword` - Describe action
Unmarks a task.

Describe the action and its outcome.
Use the command:

Example of usage:
`unmark index`

`keyword (optional arguments)`
Example of usage:

`unmark 2`

Expected outcome:

Description of the outcome.
```
-------------------------------------
Unmarked the following task:
[D][ ] Group Project (by: Friday)
-------------------------------------
```

### Deleting a Task: `delete`

Deletes a task.

Use the command:

`Delete index`

Example of usage:

`delete 2`

Expected outcome:

```
expected output
-------------------------------------
The following task has been deleted:
[D][ ] Group Project (by: Friday)
You now have 2 tasks.
-------------------------------------
```

### View all tasks: `list`

Displays all the tasks currently in the list.

Use the command:

`list`

Expected outcome:

```
-------------------------------------
Here is the list of your tasks:
1. [T][ ] Math Tutorial
2. [E][ ] Concert (at: Sunday 1900)
-------------------------------------
```

### Exiting the program: `bye`

Stops the execution of Duke.

Use the command:

`bye`

Expected outcome:

```
-------------------------------------
Goodbye, hope to see you again.
-------------------------------------
```

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

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

import duke.storage.Storage;
import duke.parser.Parser;
import duke.task.TaskList;
import duke.ui.UI;

public class Duke {

private static Storage storage;
public static UI ui;
private static TaskList tasks;

public Duke () {
Duke.storage = new Storage();
Duke.ui = new UI();
Duke.tasks = new TaskList(storage.startReading());
}

public void run() {
ui.welcomeUser();
Parser parser = new Parser();
parser.executeCommands(ui, tasks, storage);
}

public static void main(String[] args) {
new Duke().run();
}
}
16 changes: 16 additions & 0 deletions src/main/java/duke/exception/DukeException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package duke.exception;

public class DukeException extends Exception {

private String message;

/**
* Constructor for DukeException
*
* @param message The error message to be displayed
*/
public DukeException(String message) {
super(message);
this.message = message;
}
}
Loading