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

[Pranav Ganesh] iP #477

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d839859
Add Gradle support
May 24, 2020
244ea63
Finished Level-1
e0661424 Aug 19, 2021
05b4e5e
Finished Level-2
e0661424 Aug 19, 2021
bad6e71
Finished Level-3
e0661424 Aug 19, 2021
15cfb00
Finished Level-4
e0661424 Aug 19, 2021
6a1c9de
Finished A-TextUiTesting
e0661424 Aug 19, 2021
667a5bd
Finished Level-5
e0661424 Aug 19, 2021
57c60d1
Finished Level-6
e0661424 Aug 19, 2021
e70d0aa
Comply with Java coding standard
e0661424 Aug 26, 2021
80299be
Finish Level-7
e0661424 Aug 27, 2021
cfad495
Finish Level-8
e0661424 Aug 27, 2021
10b01bb
Add line wrapping at appropriate places
e0661424 Aug 27, 2021
2c44649
Merge branch 'branch-Level-7'
e0661424 Aug 28, 2021
f7e6d0a
Merge branch branch-Level-8 into Master
e0661424 Aug 28, 2021
7ae663c
Add new files for individual classes in Duke.java
e0661424 Aug 28, 2021
c6035cd
Add TaskList class
e0661424 Aug 28, 2021
a5f3c25
Add Storage class
e0661424 Aug 28, 2021
8026b89
Add Command class and relevant subclasses
e0661424 Aug 28, 2021
9605358
Enhance the functionality of the Storage class
e0661424 Aug 28, 2021
4537188
Add Ui class
e0661424 Aug 28, 2021
068f340
Finish A-MoreOOP
e0661424 Aug 28, 2021
493460f
Add A-Packages
e0661424 Aug 29, 2021
8479f34
Add JUnit Test for the Parser class
e0661424 Aug 29, 2021
02e7e75
Add JUnit Test for the DukeException class
e0661424 Aug 29, 2021
8381e30
Add JUnit Test for the TaskList class
e0661424 Aug 29, 2021
be2314a
Finish A-JUnit
e0661424 Aug 29, 2021
ce9da73
Modify .gitignore file
e0661424 Aug 31, 2021
1e3a89f
Finish A-CodingStandard
e0661424 Sep 1, 2021
92529e0
Finish A-JavaDoc
e0661424 Sep 1, 2021
11a840b
Finish Level-9
e0661424 Sep 1, 2021
15859ea
Merge branch 'branch-A-JavaDoc'
e0661424 Sep 1, 2021
528b73e
Merge branch-A-CodingStandard into Master
e0661424 Sep 1, 2021
8621cd4
Merge branch 'branch-Level-9'
e0661424 Sep 1, 2021
24169f9
Finish Level-9 (Latest)
e0661424 Sep 1, 2021
1e26b45
Merge remote-tracking branch 'origin/add-gradle-support'
e0661424 Sep 2, 2021
013d465
Modify project directory structure
e0661424 Sep 2, 2021
f01545c
Add branch-Level-10
e0661424 Sep 9, 2021
a84441a
Merge branch 'branch-Level-10'
e0661424 Sep 9, 2021
c2dfd54
Finish Level-10
e0661424 Sep 9, 2021
815d295
Enhance exception handling
e0661424 Sep 10, 2021
690a8f4
Add assertions to document important assumptions in the code
e0661424 Sep 13, 2021
956c0a1
Merge branch-A-Assertions into master
pranav-ganesh Sep 13, 2021
d8dfd36
Refactor code to improve code quality
e0661424 Sep 15, 2021
bf16d73
Merge branch-A-CodeQuality into master
pranav-ganesh Sep 15, 2021
c2cbb49
Add C-Update
e0661424 Sep 20, 2021
8afc4ce
Add Ui.png and enhance GUI
e0661424 Sep 20, 2021
2283f09
Add User Guide
e0661424 Sep 20, 2021
b93000a
Add Javadoc to more files
e0661424 Sep 20, 2021
5802939
Add final touches to the code
e0661424 Sep 20, 2021
3848c56
Update User Guide
e0661424 Sep 20, 2021
7668565
Further Update User Guide
e0661424 Sep 20, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/.idea/
/out/
/*.iml
out/artifacts/ip_jar

# Gradle build files
/.gradle/
Expand Down
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
62 changes: 62 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
plugins {
id 'java'
id 'application'
id 'checkstyle'
id 'com.github.johnrengelman.shadow' version '5.1.0'
}

repositories {
mavenCentral()
}

dependencies {
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.5.0'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.5.0'

String javaFxVersion = '11'

implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'linux'
}

test {
useJUnitPlatform()

testLogging {
events "passed", "skipped", "failed"

showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
showStandardStreams = false
}
}

application {
mainClassName = "duke.Launcher"
}

shadowJar {
archiveBaseName = "duke"
archiveClassifier = null
}

checkstyle {
toolVersion = '8.29'
}

run {
standardInput = System.in
enableAssertions = true
}
267 changes: 258 additions & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,278 @@
# User Guide

Duke is a personal assistant chatbot that will help you keep track of various things.
It is optimized for use via a Command Line Interface (CLI) while still having the benefits of a Graphical
User Interface (GUI).

![Image of Duke](https://github.com/pranav-ganesh/ip/blob/master/docs/Ui.png?raw=true)

## Features

### Feature-ABC
1) Add tasks with deadline
2) Add todos
3) Add events
4) Edit tasks
5) View the task list
6) Mark tasks as done
7) Delete tasks
8) Find tasks by keyword
9) Clone tasks

### Storage file

Store the task list in a local file.

Description of the feature.
### Add, Edit, View, Delete, Find

### Feature-XYZ
Add, Edit, View, Delete, Clone and Find tasks.

Description of the feature.
### Mark as done

Mark tasks as done once the task is completed.

## Usage

### `Keyword` - Describe action
### Adding a todo: `todo <description>`

Describe the action and its outcome.
Adds a task of type todo to the task list.

Example of usage:

`keyword (optional arguments)`
`todo purchase laptop`

Expected outcome:

The task is added to the task list.

```
Got it. I've added this task:
[T][] purchase laptop
Now you have 1 task(s) in the list.
```

### Adding a deadline: `deadline <description>/by <yyyy-MM-dd> <HHmm>`

Adds a task of type deadline to the task list.

Example of usage:

`deadline CS2103T iP/by 2021-09-20 2359`

Expected outcome:

Description of the outcome.
The task is added to the task list.

```
expected output
Got it. I've added this task:
[D][] CS2103T iP (by: Sep 20 2021, 11 PM)
Now you have 2 task(s) in the list.
```

### Adding an event: `event <description>/at <yyyy-MM-dd> <HHmm>`

Adds a task of type event to the task list.

Example of usage:

`event concert/at 2021-09-25 1800`

Expected outcome:

The task is added to the task list.

```
Got it. I've added this task:
[E][] concert (at: Sep 25 2021, 6 PM)
Now you have 3 task(s) in the list.
```

### Viewing the task list: `list`

View the current task list.

Example of usage:

`list`

Expected outcome:

The task list is printed on the screen.

```
1. [T][] purchase laptop
2. [D][] CS2103T iP (by: Sep 20 2021, 11 PM)
3. [E][] concert (at: Sep 25 2021, 6 PM)
```

### Finding tasks with a keyword: `find <keyword>`

Finds task(s) in the task list that contain the keyword.

Example of usage:

`find laptop`

Expected outcome:

Tasks containing the keyword 'laptop' in their description will be displayed.

```
Here are the matching task(s) in your list:
1. [T][] purchase laptop
```

### Marking tasks as done: `done <task index>`

Marks task as complete. The task index refers to number this task is associated
to in the task list.

Example of usage:

`done 1`

Expected outcome:

The first task in the task list is marked as done. [X] denotes that the task is done.

```
Nice! I've marked this task as done:
[T][X] purchase laptop
```

### Deleting tasks: `delete <task index>`

Deletes task in the task list. The task index refers to the number this task is associated
to in the task list.

Example of usage:

`delete 1`

Expected outcome:

The first task in the task list is deleted.

```
Noted. I've removed this task:
[T][X] purchase laptop
Now you have 2 tasks in the list.
```

### Cloning tasks: `clone <task index>`

Clones task in the task list and adds it to the task list. The task index refers to the number
this task is associated to in the task list.

Example of usage:

`clone 1`

Expected outcome:

The first task in the task list is cloned and added to the task list.

```
Task 1 from the task list has been cloned! Here is
the latest task list:
1. [D][] CS2103T iP (by: Sep 20 2021, 11 PM)
2. [E][] concert (at: Sep 25 2021, 6 PM)
3. [D][] CS2103T iP (by: Sep 20 2021, 11 PM)
```

### Editing tasks: `edit <task index>/task <new task command>`

Replaces the task in the specified task index with the new task. The new task command can be a
deadline, event or todo. The task index refers to the number this task is associated to in the task list.

Example of usage:

`edit 1/task event football match/at 2021-12-03 1900`

Expected outcome:

The first task in the task list is updated with the new task.

```
Task 1 in the task list has been updated! Here is
your latest list:
1. [E][] football match (by: Dec 3 2021, 7 PM)
2. [E][] concert (at: Sep 25 2021, 6 PM)
3. [D][] CS2103T iP (by: Sep 20 2021, 11 PM)
```

### Editing task descriptions: `edit <task index>/description <new description>`

Replaces the task description of the task in the specified task index with the new description.
The task index refers to the number this task is associated to in the task list.

Example of usage:

`edit 1/description badminton match`

Expected outcome:

The first task in the task list is updated with the new task.

```
The description of Task 1 in the task list has been
updated! Here is your latest list:
1. [E][] badminton match (by: Dec 3 2021, 7 PM)
2. [E][] concert (at: Sep 25 2021, 6 PM)
3. [D][] CS2103T iP (by: Sep 20 2021, 11 PM)
```

### Editing task date and time: `edit <task index>/datetime <yyyy-MM-dd> <HHmm>`

Replaces the date and time of the task in the specified task index with the new date and time.
The task in the specified task index has to be a deadline or event task since todos don't have a date and time.
The task index refers to the number this task is associated to in the task list.

Example of usage:

`edit 1/datetime 2022-01-01 2000`

Expected outcome:

The first task in the task list is updated with the new task.

```
The DateTime of Task 1 in the task list has been
updated! Here is your latest list:
1. [E][] badminton match (by: Jan 1 2022, 8 PM)
2. [E][] concert (at: Sep 25 2021, 6 PM)
3. [D][] CS2103T iP (by: Sep 20 2021, 11 PM)
```

### Exiting the application: `bye`

Terminates and closes the application window.

Example of usage:

`bye`

Expected outcome:

The application displays the message 'Bye. Have a great day!' and then exits. The application window closes.

```
Bye. Have a great day!
```

## Command summary

Command | Format | Example
------------ | ------------- | -------------
todo | ```todo <description>``` | ```todo homework```
event | ```event <description>/at <yyyy-MM-dd> <HHmm>``` | ```event concert/at 2021-03-04 1900```
deadline | ```deadline <description>/by <yyyy-MM-dd> <HHmm>``` | ```deadline assignment/by 2021-09-20 2359```
list | ```list``` | ```list```
done | ```done <task index>``` | ```done 2```
delete | ```delete <task index>``` | ```delete 2```
find | ```find <keyword>``` | ```find assignment```
edit task | ```edit <task index>/task <new task command>``` | ```edit 2/task deadline worksheet/by 2021-10-10 1000```
edit description | ```edit <task index>/description <new description>``` | ```edit 1/description CS2103T iP```
edit date and/or time | ```edit <task index>/datetime <yyyy-MM-dd> <HHmm>``` | ```edit 3/datetime 2022-03-08 2300```
clone | ```clone <task index>``` | ```clone 1```
bye | ```bye``` | ```bye```

Binary file added docs/Ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added duke.txt
Empty file.
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading