Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1e44177
Update welcome message
kristianachwan Jan 26, 2023
d604700
Add greet, echo, and exit feature
kristianachwan Jan 27, 2023
ea35053
Add add and list feature
kristianachwan Jan 27, 2023
6c9b878
Add mark as done feature and Task class
kristianachwan Jan 27, 2023
76d2e4c
Follow coding standard and refactor repeated code
kristianachwan Jan 27, 2023
1c8a1eb
Create ToDo, Deadline, Event entities
kristianachwan Feb 1, 2023
5d62adf
Incorporate adding todo, deadline, event entity
kristianachwan Feb 1, 2023
9423d8a
Fix formatting
kristianachwan Feb 1, 2023
aa5f8b5
Bug fix empty line + add UI testing
kristianachwan Feb 1, 2023
4fffeda
Change linebreak into the safer linearSeparator
kristianachwan Feb 1, 2023
3cb44ea
Fix bug for adding deadline
kristianachwan Feb 1, 2023
02cb628
Reformat code
kristianachwan Feb 1, 2023
6f74566
Reformat code (2)
kristianachwan Feb 1, 2023
f9c599b
Refactor using case statement
kristianachwan Feb 1, 2023
37eb12a
Fix bug not adding break in case
kristianachwan Feb 1, 2023
85f757f
Add parser to each entity
kristianachwan Feb 8, 2023
374ac57
Add exceptions and error handling
kristianachwan Feb 8, 2023
3d199c2
Organize into packages
kristianachwan Feb 8, 2023
0f6fcc6
Fix UI-testing
kristianachwan Feb 8, 2023
2ca1e40
Improve variables naming
kristianachwan Feb 8, 2023
075e95f
Adding command and payload model
kristianachwan Feb 14, 2023
967378f
Add unknown command
kristianachwan Feb 14, 2023
5838b80
Improve code quality
kristianachwan Feb 14, 2023
21cedfd
Implement ArrayList for storing tasks
kristianachwan Feb 14, 2023
ffc1076
Extract methods refactoring
kristianachwan Feb 14, 2023
5f38dce
Add delete task feature
kristianachwan Feb 14, 2023
2a0f5ab
Add DataAccess class
kristianachwan Feb 14, 2023
2fe149c
Merge pull request #1 from kristianachwan/branch-Level-6
kristianachwan Feb 14, 2023
220b7b7
Merge branch 'master' into branch-Level-7
kristianachwan Feb 14, 2023
baac899
Merge pull request #2 from kristianachwan/branch-Level-7
kristianachwan Feb 14, 2023
62219f3
Resolve error after merging
kristianachwan Feb 14, 2023
5a25935
Fix bug writing duke.txt
kristianachwan Feb 14, 2023
3496b8e
Clean code
kristianachwan Feb 14, 2023
8a1dba8
Refactor to more OOP
kristianachwan Feb 28, 2023
2b7328b
Add find feature
kristianachwan Mar 1, 2023
a8e51f7
Add method header comments
kristianachwan Mar 1, 2023
08339d6
Merge pull request #3 from kristianachwan/branch-Level-9
kristianachwan Mar 1, 2023
f41e223
Syncing with master
kristianachwan Mar 1, 2023
917ba29
Merge pull request #4 from kristianachwan/branch-A-JavaDoc
kristianachwan Mar 1, 2023
5d5a498
Add user guide
kristianachwan Mar 1, 2023
59d2021
Fix typo userguide
kristianachwan Mar 1, 2023
13b1697
Change user guide filenaming
kristianachwan Mar 1, 2023
89999d6
Change filepath of duke.txt
kristianachwan Mar 1, 2023
ae2b710
Change the format of printing search results
kristianachwan Mar 1, 2023
2e3774d
Add line separator
kristianachwan Mar 1, 2023
89782e8
Update minor mistake on UG
kristianachwan Mar 1, 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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Duke project template
# duke.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,7 +13,7 @@ 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.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
____ _
Expand Down
2 changes: 2 additions & 0 deletions data/duke.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. [D][ ] tP Meeting (by: Friday 16.00pm)
2. [E][ ] CS2113 tP Meeting (from: Friday 16.00pm to: 18.00pm)
140 changes: 127 additions & 13 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,143 @@
# User Guide

## Features
Duke is a Command-Line Interface (CLI) task manager. It allows you to keep track of your tasks quickly and navigate
through those tasks quickly.

### Feature-ABC
## Features

Description of the feature.
- Adding different types of tasks:
- Todo: the most basic type of task
- Deadline: type of task which you can assign the due date of it
- Event: type of task which has a start and end date
- Searching based on keyword and listing all tasks are also supported

### Feature-XYZ
## Getting started

Description of the feature.
> Java 11 is recommended to run `Duke`

## Usage
1. Download the latest ip.jar from [here](https://github.com/kristianachwan/ip/releases)
2. Go to the directory where you downloaded
3. Run `java -jar ip.jar`

### `Keyword` - Describe action
## Add ToDo

Describe the action and its outcome.
Adds todo to your list. Format: `todo <todo-name>`

Example of usage:
### Adding `ToDo` example:

`keyword (optional arguments)`
```
todo CS2113 tP Meeting
____________________________________________________________
Got it. I've added this task:
[T][ ] CS2113 tP Meeting
____________________________________________________________
```

## Add Deadline

Adds deadline to your list. Format: `deadline <deadline-name> /<due-by>`

### Adding `Deadline` example:

```
deadline tP Meeting /Friday 16.00pm
____________________________________________________________
Got it. I've added this task:
[D][ ] tP Meeting (by: Friday 16.00pm)
____________________________________________________________
```

## Add Deadline

Adds event to your list. Format: `event <event-name> /<start-time> /<end-time> `

### Adding `Event` example:

```
event CS2113 tP Meeting /Friday 16.00pm /18.00pm
____________________________________________________________
Got it. I've added this task:
[E][ ] CS2113 tP Meeting (from: Friday 16.00pm to: 18.00pm)
____________________________________________________________

```

### Listing all tasks

List all of your tasks. Format: `list`

### Listing all tasks example:

```
list
____________________________________________________________
1. [T][ ] CS2113 tP Meeting
2. [D][ ] tP Meeting (by: Friday 16.00pm)
3. [E][ ] CS2113 tP Meeting (from: Friday 16.00pm to: 18.00pm)
____________________________________________________________
```

Expected outcome:
## Deleting a task:

Description of the outcome.
Delete your task by indicate the index of the task. Format: `delete <task-index>`

### Deleting a task example:

```
delete 1
____________________________________________________________
Noted! I've removed this task
[T][ ] CS2113 tP Meeting
____________________________________________________________
```
expected output

## Finding specific tasks

Find your task based on specific keyword. Format: `find <keyword>`

### Finding specific tasks example

```
find tP
____________________________________________________________
[D][ ] tP Meeting (by: Friday 16.00pm)
[E][ ] CS2113 tP Meeting (from: Friday 16.00pm to: 18.00pm)
____________________________________________________________
```

## Marking task as done

Mark your task as done. It will have `[X]` when it is listed again.
Format: `mark <task-index>`

### Marking task as done example

```
mark 1
____________________________________________________________
Nice! I've marked this task as done:
[D][X] tP Meeting (by: Friday 16.00pm)
____________________________________________________________
```

### Marking task as undone

Mark your task as undone (or unmark). It will revert back to `[]`.
Format: `unmark <task-index>`

```
unmark 1
____________________________________________________________
Ok, I've marked this task as not done:
[D][ ] tP Meeting (by: Friday 16.00pm)
____________________________________________________________
```

### Exiting the program

```
bye
____________________________________________________________
Bye. Hope to see you again soon!
____________________________________________________________
```
5 changes: 5 additions & 0 deletions duke.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1. [T][ ] asd1
2. [T][ ] asd23
3. [T][ ] asd33
4. [T][ ] a
5. [D][ ] asd (by: 2pm)
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

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

import duke.boundary.Ui;
import duke.controller.TaskList;
import duke.model.Command;
import duke.utils.Parser;
import duke.utils.Storage;

import java.util.Scanner;

/**
* A class that serves as an entry point to the application
*/
public class Duke {
public static void main(String[] args) {
Storage dataAccess = new Storage("duke.txt");
Scanner scanner = new Scanner(System.in);
TaskList taskList = new TaskList();
Ui ui = new Ui(taskList);
ui.printDuke();
String input;
while (true) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

use condition here instead of system.Exit later

input = scanner.nextLine();
Command command = Parser.parse(input);
ui.readCommand(command);
dataAccess.writeToFile("\t" + taskList.toString());
}

}


}
Loading