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

iP #187

Open
wants to merge 50 commits into
base: master
Choose a base branch
from
Open

iP #187

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
0033e6e
Add Level 0
Aug 26, 2021
9b01139
Echo's user input
Aug 26, 2021
c113fdf
Add Level-2
Aug 26, 2021
6db8c92
add level-3
Aug 29, 2021
9df50eb
Code quality improved
Aug 29, 2021
d779c13
Add level-4
Sep 2, 2021
d25eed0
Improve Code Quality
Sep 2, 2021
87826c1
auto testing
Sep 2, 2021
2d8013a
Add A-Exceptions class
Sep 9, 2021
8857a32
Merge branch 'branch-Level-5'
Sep 9, 2021
2aaa1e0
Add A-Packages
Sep 9, 2021
9b1d3fa
Merge branch 'branch-A-Packages'
Sep 9, 2021
c30246f
Add Level-6
Sep 13, 2021
5531ec3
Add Level-7
Sep 13, 2021
7695559
Add Level-7 (latest)
Sep 14, 2021
8b1d778
Merge branch 'branch-Level-6'
Sep 14, 2021
bef204e
Merge branch 'branch-Level-7'
Sep 14, 2021
d3e43c0
Add A-Jar
Sep 16, 2021
6ac8bb0
Add A-Jar updated
Sep 16, 2021
27a1bf8
Add Level-8
Sep 22, 2021
2d29b00
Add Level-9
Sep 22, 2021
6340b5b
Add new classes v1
Sep 22, 2021
560e56c
Merge pull request #1 from pragyan01/branch-Level-8
pragyan01 Sep 22, 2021
9dd7b4f
Merge branch 'master' of https://github.com/pragyan01/ip
Sep 22, 2021
39c63ba
Merge branch 'master' into branch-Level-9
Sep 22, 2021
e8b3be1
Merge pull request #2 from pragyan01/branch-Level-9
pragyan01 Sep 22, 2021
11a1fda
Merge branch 'master' of https://github.com/pragyan01/ip
Sep 22, 2021
b07fb0e
txt file
Sep 22, 2021
c3bf73e
level-9 latest
Sep 22, 2021
ab62a67
Merge branch 'branch-Level-9'
Sep 22, 2021
c8541d5
Level-8 latest
Sep 22, 2021
89962ef
Updated Merge of Level-8 & Level-9 into Master. Final
Sep 22, 2021
1ebb51f
Add documentation
Sep 24, 2021
b65f74b
All A-JavaDoc comments added
Sep 27, 2021
3a328f1
Merge branch 'master' into branch-A-JavaDoc
Sep 27, 2021
434010a
add final copy of java doc commends
Sep 27, 2021
0a61184
Merge branch 'branch-A-JavaDoc'
Sep 27, 2021
11e68d9
Add documentation-latest copy
Sep 27, 2021
7552d82
Set theme jekyll-theme-cayman
pragyan01 Sep 28, 2021
3536322
Add UG
Sep 28, 2021
1ffb222
Merge branch 'master' of https://github.com/pragyan01/ip
Sep 28, 2021
eac98bb
Add UG-latest version
Sep 29, 2021
b66e3a0
final version of ip
Sep 29, 2021
ad649c6
added some small changes to UG
Sep 30, 2021
4093607
Set theme jekyll-theme-hacker
pragyan01 Sep 30, 2021
0ff28b1
Set theme jekyll-theme-time-machine
pragyan01 Sep 30, 2021
daabba7
Merge branch 'master' of https://github.com/pragyan01/ip
Sep 30, 2021
0e89a93
add final version ip
Sep 30, 2021
cf715c5
Set theme jekyll-theme-hacker
pragyan01 Sep 30, 2021
3a9590d
Merge branch 'master' of https://github.com/pragyan01/ip
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
Empty file added UserData.txt
Empty file.
201 changes: 190 additions & 11 deletions docs/README.md
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

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-hacker
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

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

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!

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;
}
}
20 changes: 20 additions & 0 deletions src/main/java/duke/Duke.java
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();
}
}

7 changes: 7 additions & 0 deletions src/main/java/duke/DukeException.java
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);
}
}
46 changes: 46 additions & 0 deletions src/main/java/duke/Event.java
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;
}
}
Loading