-
Notifications
You must be signed in to change notification settings - Fork 193
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
iP #187
Open
pragyan01
wants to merge
50
commits into
nus-cs2113-AY2122S1:master
Choose a base branch
from
pragyan01:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
iP #187
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
0033e6e
Add Level 0
9b01139
Echo's user input
c113fdf
Add Level-2
6db8c92
add level-3
9df50eb
Code quality improved
d779c13
Add level-4
d25eed0
Improve Code Quality
87826c1
auto testing
2d8013a
Add A-Exceptions class
8857a32
Merge branch 'branch-Level-5'
2aaa1e0
Add A-Packages
9b1d3fa
Merge branch 'branch-A-Packages'
c30246f
Add Level-6
5531ec3
Add Level-7
7695559
Add Level-7 (latest)
8b1d778
Merge branch 'branch-Level-6'
bef204e
Merge branch 'branch-Level-7'
d3e43c0
Add A-Jar
6ac8bb0
Add A-Jar updated
27a1bf8
Add Level-8
2d29b00
Add Level-9
6340b5b
Add new classes v1
560e56c
Merge pull request #1 from pragyan01/branch-Level-8
pragyan01 9dd7b4f
Merge branch 'master' of https://github.com/pragyan01/ip
39c63ba
Merge branch 'master' into branch-Level-9
e8b3be1
Merge pull request #2 from pragyan01/branch-Level-9
pragyan01 11a1fda
Merge branch 'master' of https://github.com/pragyan01/ip
b07fb0e
txt file
c3bf73e
level-9 latest
ab62a67
Merge branch 'branch-Level-9'
c8541d5
Level-8 latest
89962ef
Updated Merge of Level-8 & Level-9 into Master. Final
1ebb51f
Add documentation
b65f74b
All A-JavaDoc comments added
3a328f1
Merge branch 'master' into branch-A-JavaDoc
434010a
add final copy of java doc commends
0a61184
Merge branch 'branch-A-JavaDoc'
11e68d9
Add documentation-latest copy
7552d82
Set theme jekyll-theme-cayman
pragyan01 3536322
Add UG
1ffb222
Merge branch 'master' of https://github.com/pragyan01/ip
eac98bb
Add UG-latest version
b66e3a0
final version of ip
ad649c6
added some small changes to UG
4093607
Set theme jekyll-theme-hacker
pragyan01 0ff28b1
Set theme jekyll-theme-time-machine
pragyan01 daabba7
Merge branch 'master' of https://github.com/pragyan01/ip
0e89a93
add final version ip
cf715c5
Set theme jekyll-theme-hacker
pragyan01 3a9590d
Merge branch 'master' of https://github.com/pragyan01/ip
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,208 @@ | ||
# User Guide | ||
Duke is a CLI optimised bot that helps you create and manage 3 types of tasks - Deadlines, Events | ||
and todo tasks. Users have the ability to create these tasks, mark them as done, delete | ||
and find them. Users can also view their tasks in a list format. | ||
* [Quick Start](#quick-start) | ||
* [Features](#features) | ||
* [Usage](#usage) | ||
* [Adding a task](#adding-a-task) | ||
* [Marking a task](#marking-a-task) | ||
* [Deleting a task](#deleting-a-task) | ||
* [Finding a task](#finding-a-task) | ||
* [Listing all tasks](#listing-all-tasks) | ||
* [Exiting the program](#exiting-the-program) | ||
* [Command Summary](#command-summary) | ||
|
||
## Quick Start | ||
1. Ensure you have Java 11 or above installed in your computer. | ||
2. Download the latest iP.jar under v2.0 from [here](https://github.com/pragyan01/ip/releases). | ||
3. Go to the folder you saved iP.jar and note the absolute file path. | ||
4. If you are using Windows, open up a Command prompt terminal cmd.exe or powershell.exe and for | ||
Mac and Linux users, do the same with the terminal of your respective systems. | ||
5. Navigate to the folder where iP.jar is stored. | ||
6. Execute java -jar iP.jar in the terminal, and the application will start running. | ||
|
||
You should be able to see something like this: | ||
``` | ||
------------------------------------------------------------------------------------------ | ||
Hello! I'm Duke. | ||
____ _ | ||
| _ \ _ _| | _____ | ||
| | | | | | | |/ / _ \ | ||
| |_| | |_| | < __/ | ||
|____/ \__,_|_|\_\___| | ||
What can i do for you? | ||
------------------------------------------------------------------------------------------ | ||
|
||
Enter your wish: | ||
------------------------------------------------------------------------------------------ | ||
``` | ||
## Features | ||
1. Add any of the 3 task types: todo, deadline and events | ||
2. Mark a task as done | ||
3. Delete a task | ||
4. Find a specific task or tasks containing the searched keyword | ||
5. List out all tasks | ||
6. Exit the program | ||
|
||
### Feature-ABC | ||
## Usage | ||
|
||
Description of the feature. | ||
### Adding a task | ||
Add tasks from any 3 types available: Todo, deadline and event | ||
|
||
### Feature-XYZ | ||
1. A todo task only has a description associated with it. | ||
This command allows you to add a new todo task to your list. | ||
|
||
Description of the feature. | ||
`todo {task description}` - Adds a new todo task | ||
|
||
## Usage | ||
Example of usage: | ||
|
||
`todo buy dinner` | ||
|
||
Expected outcome: | ||
|
||
``` | ||
That's the spirit! I've added this task: | ||
|
||
[T][ ] buy dinner | ||
|
||
Now you have 1 tasks in the list. | ||
``` | ||
|
||
2. A deadline task has a description, and a deadline associated with it. | ||
This command allows you to add a new deadline task to your list. | ||
|
||
`deadline {task description} /by {yyyy-mm-dd}` - Adds a new deadline task | ||
|
||
Example of usage: | ||
|
||
`deadline submit assignment /by 2021-10-30` | ||
|
||
Expected outcome: | ||
|
||
### `Keyword` - Describe action | ||
``` | ||
Deadline Entered: Oct 30 2021 | ||
|
||
Got it. I've added this task: | ||
|
||
[D][ ] submit assignment (by: 2021-10-30) | ||
|
||
Now you have 2 tasks in the list. | ||
``` | ||
|
||
Describe the action and its outcome. | ||
3. An event task has a description, and a duration associated with it. | ||
This command allows you to add a new event task to your list. | ||
|
||
Example of usage: | ||
`event {task description} /at {duration}` - Adds a new event task | ||
|
||
`keyword (optional arguments)` | ||
Example of usage: | ||
|
||
`event team meeting /at Monday 5-6pm` | ||
|
||
Expected outcome: | ||
|
||
Description of the outcome. | ||
``` | ||
Got it. I've added this task: | ||
|
||
[E][ ] team meeting (at: Monday 5-6pm) | ||
|
||
Now you have 3 tasks in the list. | ||
``` | ||
expected output | ||
### Marking a task | ||
Marks a task's status as done. | ||
|
||
`done {task number}` - Updates the task as completed | ||
|
||
Example of usage: | ||
|
||
`done 1` | ||
|
||
Expected outcome: | ||
|
||
``` | ||
Kudos! One less thing to stress about! | ||
|
||
[T][X] buy dinner | ||
``` | ||
### Deleting a task | ||
Deletes a specific task from the list. | ||
|
||
`delete {task number}` - Removes the specific task | ||
|
||
Example of usage: | ||
|
||
`delete 1` | ||
|
||
Expected outcome: | ||
|
||
``` | ||
One more thing outta your life as always... | ||
|
||
[T][X] buy dinner | ||
|
||
You now have 2 tasks left. | ||
``` | ||
### Finding a task | ||
Searches for a specific task from the list or tasks containing the keyword. | ||
|
||
`find {keyword}` - Searches for tasks containing keyword | ||
|
||
Example of usage: | ||
|
||
`find assingment` | ||
|
||
Expected outcome: | ||
|
||
``` | ||
Lucky for you, i'm really good at digging through your mess: | ||
------------------------------------------------------------------------------------------ | ||
|
||
1. [D][ ] submit assignment (by: 2021-10-30) | ||
|
||
Enter your wish: | ||
``` | ||
### Listing all tasks | ||
Prints all existing tasks in the list. | ||
|
||
`list` - Lists everything | ||
|
||
Example of usage: | ||
|
||
`list` | ||
|
||
Expected outcome: | ||
|
||
``` | ||
1. [D][ ] submit assignment (by: 2021-10-30) | ||
|
||
2. [E][ ] team meeting (at: Monday 5-6pm) | ||
``` | ||
### Exiting the program | ||
Terminates the program and exits. | ||
|
||
`bye` - Terminates program | ||
|
||
Example of usage: | ||
|
||
`bye` | ||
|
||
Expected outcome: | ||
|
||
``` | ||
------------------------------------------------------------------------------------------ | ||
|
||
Ciao! More tasks to do later! | ||
------------------------------------------------------------------------------------------ | ||
``` | ||
## Command Summary | ||
|
||
Description | Syntax | Example | ||
------------|--------|-------- | ||
Add todo task | todo {task description} | todo buy dinner | ||
Add deadline task | deadline {task description} /by {yyyy-mm-dd} | deadline submit assignment /by 2021-10-30 | ||
Add event task | event {task description} /at {duration} | event team meeting /at Monday 5-6pm | ||
Mark task as done | done {task number} | done 1 | ||
Delete a task | delete {task number} | delete 1 | ||
Find a task | find {keyword} | find assignment | ||
Exit the program | bye | bye | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
theme: jekyll-theme-hacker |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Main-Class: duke.Duke | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package duke; | ||
import java.time.LocalDate; | ||
import java.time.format.DateTimeFormatter; | ||
|
||
/** | ||
* Class that is used in order to create a new deadline task. | ||
* | ||
* @author pragyan01 | ||
*/ | ||
public class Deadline extends Task { | ||
|
||
protected String by; | ||
|
||
/** | ||
* Constructor to instantiate new deadline object | ||
* | ||
* @param description Description of the deadline task | ||
* @param by Due date of the deadline task | ||
*/ | ||
public Deadline(String description, String by) { | ||
super(description); | ||
LocalDate time = LocalDate.parse(by); | ||
this.by = time.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); | ||
} | ||
|
||
/** | ||
* Method to return String that has been stored in the Arraylist. | ||
* | ||
* @return String stored in the ArrayList | ||
*/ | ||
@Override | ||
public String toString() { | ||
return "[D][" + super.getStatusIcon() + "] " + super.toString() + "(by: " + by + ")"; | ||
} | ||
|
||
/** | ||
* Method to return String that has been stored in the Arraylist. | ||
* | ||
* @return String stored in the ArrayList | ||
*/ | ||
@Override | ||
public String toSave() { | ||
int done = 0; | ||
if (this.isDone) { | ||
done = 1; | ||
} | ||
return "deadline " + description + "/by " + by + " | " + done; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package duke; | ||
import static duke.Parser.inputSort; | ||
import static duke.Ui.start; | ||
|
||
/** | ||
* Main class of Duke bot. | ||
* | ||
* @author pragyan01 | ||
*/ | ||
public class Duke { | ||
|
||
/** | ||
* Main method of Duke bot. | ||
*/ | ||
public static void main(String[] args) throws DukeException { | ||
start(); | ||
inputSort(); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package duke; | ||
|
||
public class DukeException extends Exception { | ||
public DukeException(String errorMessage) { | ||
super(errorMessage); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package duke; | ||
|
||
/** | ||
* Class that is used in order to create a new event task. | ||
* | ||
* @author pragyan01 | ||
*/ | ||
public class Event extends Task { | ||
|
||
protected String at; | ||
|
||
/** | ||
* Constructor to instantiate new event object | ||
* | ||
* @param description Description of the event task | ||
* @param at Due date of the event task | ||
*/ | ||
public Event(String description, String at) { | ||
super(description); | ||
this.at = at; | ||
} | ||
|
||
/** | ||
* Method to return String that has been stored in the Arraylist. | ||
* | ||
* @return String stored in the ArrayList | ||
*/ | ||
@Override | ||
public String toString() { | ||
return "[E][" + super.getStatusIcon() + "] " + super.toString() + "(at: " + at + ")"; | ||
} | ||
|
||
/** | ||
* Method to return String that has been stored in the Arraylist. | ||
* | ||
* @return String stored in the ArrayList | ||
*/ | ||
@Override | ||
public String toSave() { | ||
int done = 0; | ||
if (this.isDone) { | ||
done = 1; | ||
} | ||
return "event " + description + "/at " + at + " | " + done; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see that you organise your types (e.g., classes) into a package for easier management!