Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
bcf20ee
Week 2 Task
yzhedwin Aug 22, 2021
2c2a310
Level-1
yzhedwin Aug 26, 2021
da7c42b
Level-2
yzhedwin Aug 26, 2021
7e2f13a
Level-3
yzhedwin Aug 26, 2021
0b9ce39
Completed A-CodingStandard
yzhedwin Aug 26, 2021
074899d
Level-4 Completed
yzhedwin Sep 3, 2021
4ce8ac0
Level-4, A-CodeQuality
yzhedwin Sep 3, 2021
c2a8cf3
Completed Level-5
yzhedwin Sep 7, 2021
e61f1e7
Completed Level-5,A-Exceptions
yzhedwin Sep 7, 2021
daef42c
Updated Ui Testing
yzhedwin Sep 7, 2021
3fc7b81
Created new branch as part of increments
yzhedwin Sep 7, 2021
ed20d64
Merge branch-Level-5 with master
yzhedwin Sep 7, 2021
e8ce66f
Completed A-Packages and improve coding standards
yzhedwin Sep 7, 2021
acfd97c
Merge branch-A-Packages with master
yzhedwin Sep 7, 2021
88ad15e
Updated runtest.bat
yzhedwin Sep 7, 2021
d3cbc29
Formatted some codes
yzhedwin Sep 7, 2021
b573d4c
Code Fixes
yzhedwin Sep 7, 2021
3974bd3
Improved A-Exception
yzhedwin Sep 7, 2021
22af079
Added delete feature
yzhedwin Sep 15, 2021
3c647fc
Added save feature and some personality for Level-7 requirement
yzhedwin Sep 16, 2021
a294af8
Minor changes to save.txt
yzhedwin Sep 16, 2021
86a9032
Merge branch Level-6 with master
yzhedwin Sep 16, 2021
c3af9c5
Merge branch Level-7 with master
yzhedwin Sep 16, 2021
92cbe7d
Added more OOP and fixed exception handling
yzhedwin Sep 27, 2021
ea44036
Added Date and Time functionality
yzhedwin Sep 29, 2021
d57c1a3
Merge pull request #1 from yzhedwin/branch-Level-8
yzhedwin Sep 29, 2021
a2984d6
Added Find Feature
yzhedwin Sep 29, 2021
4a890e0
Merge pull request #2 from yzhedwin/branch-Level-9
yzhedwin Sep 29, 2021
8a47b70
Documentation for A-JavaDoc
yzhedwin Sep 29, 2021
5217ca0
Merge pull request #3 from yzhedwin/branch-A-JavaDoc
yzhedwin Sep 29, 2021
d3eb8f0
Updated JavaDoc
yzhedwin Sep 29, 2021
468e2f1
Completed User Guide
yzhedwin Sep 30, 2021
9c9496a
Set theme jekyll-theme-cayman
yzhedwin Sep 30, 2021
0f9c8b7
Completed User Guide
yzhedwin Sep 30, 2021
788449d
Merge branch 'master' of github.com:yzhedwin/ip
yzhedwin Sep 30, 2021
e8616f6
Build ip.jar
yzhedwin Sep 30, 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
6 changes: 6 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="output" path="out/production/ip"/>
</classpath>
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ip</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions data/save.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
D|1|write book|1999/03/12 1200
T|0|read book
204 changes: 193 additions & 11 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,211 @@
# User Guide

## Features

### Feature-ABC
|___ | | | |_____| / / -- \ \
/ / | | / / | | | |
/ / | | / / | | | |
/ /___ | | /_/__ | | -- | |
|_____| | | |_____| \ \____/ /

Description of the feature.
Zizo is a desktop app for managing tasks, optimized for use via a Command Line Interface (CLI).
If you can type fast, Zizo can get your task management done faster than traditional GUI apps.
## Features

### Feature-XYZ
### Add Todo

Description of the feature.
Adds a **Todo** task

## Usage
### Add Event

Adds an **Event** task

### Add Deadline

Adds a **Deadline** task

### List

Show all the tasks in a ordered list
### Done

Mark a specific task as completed
### Delete

Remove a specific task from the tasks list
### Show Date

Show all tasks with the given deadline
### Find

Search for a tasks given a keyword
### Terminate

### `Keyword` - Describe action
Ends the program

Describe the action and its outcome.
## Usage

### `todo` - Adds a todo task to the tasks list

Example of usage:

`keyword (optional arguments)`
`todo Read a book`


###Expected output
```
____________________________________________________________

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


Example of usage:

`deadline Read a book /by 2021/09/25 1800`


###Expected output
```
____________________________________________________________

Got it. I've added this task:
[D][ ]Read a book (by: 25 Sep 2021, 6 00 PM)
Now you have 1 tasks in the list.
____________________________________________________________
```
### `event` - Adds a event task to the tasks list


Example of usage:

`event Read a book /at 2021/09/25 1800`

###Expected output
```
____________________________________________________________

Got it. I've added this task:
[E][ ]Read a book (by: 25 Sep 2021, 6 00 PM)
Now you have 1 tasks in the list.
____________________________________________________________
```
### `list` - Shows a list of tasks


Example of usage:

`list`


###Expected output
```
____________________________________________________________

Here are the task in your list:
1.[D][ ]Read a book (by: 25 Sep 2021, 6 00 PM)
____________________________________________________________
```
### `done` - Mark a task as done

Selects which task base on its index in the list to mark as done

Format: done (Task index)
* Index must be a positive integer

Example of usage:

`done 1`

Expected outcome:
```
Here are the task in your list:
1. [D][X]Read a book (by: 25 Sep 2021, 6 00 PM)
```

###Expected output
```
____________________________________________________________

Nice! task is done
____________________________________________________________
```

### `delete` - Delete task

Selects which task to delete based on its index in the tasks list

Format: delete (Task Index)
* Index must be a positive integer


Example of usage:

`delete 1`


###Expected output
```
____________________________________________________________
Noted. I've removed this task:
[D][X]Read a book (by: 25 Sep 2021, 6 00 PM)
Now you have 0 tasks in the list.
____________________________________________________________
```

### `show date` Show tasks based on date

Show tasks with the specific deadline

Example of usage:

`show date (date in yyyy/MM/dd format)`

`show date 2012/12/12`


###Expected output
```
____________________________________________________________
Here are the all the task in your list to be done by:13 Mar 1999
[E][X] collect book (at: 13 Mar 1999, 01 00 PM)
____________________________________________________________
```

### `find` - Search for a task

Show tasks with the specific deadline

Example of usage:

`find (keyword of task)`

`find book`

###Expected output
```
____________________________________________________________
Here are the all the task in your list with keyword: book
1.[D][ ] write book (by: 12 Mar 1999, 12 00 PM)
2.[T][ ] read book

____________________________________________________________
____________________________________________
```
### `Bye` - Ends the program

End the program

Example of usage:

Description of the outcome.
`bye`

###Expected output
```
expected output
____________________________________________________________
chat again next time!
____________________________________________________________
```
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-cayman
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

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

import duke.command.Command;
import duke.exception.DukeException;
import duke.parser.Parser;
import duke.storage.Storage;
import duke.tasklist.TaskList;
import duke.ui.Ui;
import java.io.FileNotFoundException;
import java.util.Locale;
import java.util.Scanner;


public class Duke {
private static final String fileDir = "./data";
private static final String fileName = "./data/save.txt";
private final Storage storage;
private TaskList task;
private final Ui ui;


/**
* Initialise all classes and load save file if it exists otherwise create a new save file
*
* @param fileName The name of the save file
* @param fileDir The directory of the save file
*/
public Duke(String fileName, String fileDir) {
storage = new Storage(fileName, fileDir);
ui = new Ui();
try {
task = new TaskList(storage.items);
storage.load(task);
} catch (FileNotFoundException e) {
ui.showSaveFileError();
storage.create();
task = new TaskList(storage.items);
}
}
private void run() {
Scanner in = new Scanner(System.in);
boolean isExit = false;
while (!isExit) {
try {
String fullCommand = ui.readCommand(in).toLowerCase(Locale.ROOT);
Command c = Parser.parse(fullCommand);
boolean hasError = Parser.verifyCommand(task, c, ui);
if (hasError) {
throw new DukeException();
}
c.execute(task, ui, storage);
isExit = c.isExit();
} catch (DukeException e) {
ui.showError();
}
}
storage.save();
ui.printEndMessage();
}
public static void main(String[] args) {
new Duke(fileName, fileDir).run();
}
}
4 changes: 4 additions & 0 deletions src/main/java/duke/command/AddCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package duke.command;

public class AddCommand {
}
Loading