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

Mohamad Nurhakiem IP #579

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Prerequisites: JDK 11, update Intellij to the most recent version.
1. Click `Open or Import`.
1. Select the project directory, and click `OK`
1. If there are any further prompts, accept the defaults.
1. After the importing is complete, locate the `src/main/java/Duke.java` file, right-click it, and choose `Run Duke.main()`. If the setup is correct, you should see something like the below:
1. After the importing is complete, locate the `src/dukemain/java/Duke.java` file, right-click it, and choose `Run Duke.dukemain()`. If the setup is correct, you should see something like the below:
```
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 {
implementation 'org.junit.jupiter:junit-jupiter:5.4.2'
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 = "dukemain.Launcher"
}

shadowJar {
archiveBaseName = "duke"
archiveClassifier = null
}

checkstyle {
toolVersion = '8.36.1'
}

run{
standardInput = System.in
}
5 changes: 5 additions & 0 deletions data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
done t buy groceries
incomplete d math homework timeOfTask: 22/09/2020 2359
done e David's birthday timeOfTask: 26/09/2020
incomplete t journal entry
incomplete d science hw assignment 3 timeOfTask: 23/09/2020 2359
222 changes: 214 additions & 8 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,226 @@
# User Guide
# Duke User Guide

## Features

### Feature 1
Description of feature.
### ToDo
Adds a ToDo task to your list.

## Usage
#### Usage

### `Keyword` - Describe action
### `todo [task description]`

Describe action and its outcome.
Creates a ToDo task with specified description and adds
it to your list.

Example of usage:

`keyword (optional arguments)`
`todo homework`

Expected outcome:

`outcome`
`Got it! Task added to your list.`<br/>
&nbsp;&nbsp;&nbsp;&nbsp;`[T][X] homework` <br/>
`Now you have x tasks in your list.`

***

### Deadline
Adds a Deadline task to your list.

#### Usage

### `deadline [task description] /by [date]`

Creates a Deadline task with specified description and time
and adds it to your list.

Example of usage:

`deadline assignment /by 19/04/2020 2359`

Expected outcome:

`Got it! Task added to your list.`<br/>
&nbsp;&nbsp;&nbsp;&nbsp;`[D][X] assignment (by: 19 Apr 2020 11:59pm)` <br/>
`Now you have x tasks in your list.`

Note: <br/>
Valid date formats : `dd-mm-yyyy`, `dd-mm-yyyy hhhh`,
`dd/mm/yyyy`, `dd/mm/yyyy hhhh`.
Any other formats will be read as String.

***

### Event
Adds an Event task to your list.

#### Usage

### `event [task description] /at [date]`

Creates an Event task with specified description and time
and adds it to your list.

Example of usage:

`event concert /at 19/04/2020 1159`

Expected outcome:

`Got it! Task added to your list.`<br/>
&nbsp;&nbsp;&nbsp;&nbsp;`[E][X] concert (at: 19 Apr 2020 11:59am)` <br/>
`Now you have x tasks in your list.` <br/>

Note: <br/>
Valid date formats : `dd-mm-yyyy`, `dd-mm-yyyy hhhh`,
`dd/mm/yyyy`, `dd/mm/yyyy hhhh`.
Any other formats will be read as String.

***

### List
Shows a list of all your tasks.

#### Usage

### `list`

Lists all tasks.

Example of usage:

`list`

Expected outcome:

`Here are your tasks:`<br/>
`1. [T][X] homework` <br/>
`2. [D][X] assignment (by: 19 Apr 2020 11:59pm)` <br/>
`3. [E][X] concert (at: 19 Apr 2020 11:59am)` <br/>

***

### Done
Marks task as completed with a [ / ].

#### Usage

### `done [index]`

Marks task at the specified index as done.

Example of usage:

`done 1`

Expected outcome:

`Nice! I have marked this task as done:`<br/>
&nbsp;&nbsp;&nbsp;&nbsp;`[T][/] homework` <br/>

Note: <br/>
Index is as specified by `list` function.

***

### Delete
Removes specified task from list.

#### Usage

### `delete [index]`

Deletes task at the specified index.

Example of usage:

`delete 1`

Expected outcome:

`Okay! I have removed this task:`<br/>
&nbsp;&nbsp;&nbsp;&nbsp;`[T] homework` <br/>
`Now you have x tasks in your list`

Note: <br/>
Index is as specified by `list` function.

***

### Clear
Deletes task list.

#### Usage

### `clear`

Deletes entire task list.

Example of usage:

`clear`

Expected outcome:

`Task list cleared!`<br/>

***

### Find
Finds task list using keyword/phrase.

#### Usage

### `find [keyword/phrase]`

Prints a sublist of tasks that contain the specified <br/>
keyword/phrase.

Example of usage:

`find math`

Expected outcome:

`Here are your matching tasks:`<br/>
`1. [D][X] math homework (by: Sep 28 2020)` <br/>
`2. [D][X] math assignment (by: Sep 30 2020)` <br/>
`3. [E][X] math lecture (at: Sep 25 2020, 03:00pm)` <br/>

If unsuccessful find: <br/>
`Sorry! There are no tasks that match that description.`

***

### Edit
Edits a specified task with a new field.

#### Usage

### `edit 1 [/d or /t] [new field]`

Edits a task at the specified index with a new field. <br/>
Tag "/d" to edit description. <br/>
Tag "/t" to edit time.

Example of usage:

`edit 1 /d math hw 1 section b`

Expected outcome:

`Okay! I have edited this task:`<br/>
&nbsp;&nbsp;&nbsp;&nbsp;`===> [D][X] math homework (by: Sep 28 2020)` <br/>
&nbsp;&nbsp;&nbsp;&nbsp;`<=== [D][X] math hw 1 section b (by: Sep 28 2020)` <br/>

Example of usage:

`edit 1 /t 29/09/2020 2359`

Expected outcome:

`Okay! I have edited this task:`<br/>
&nbsp;&nbsp;&nbsp;&nbsp;`===> [D][X] math homework (by: Sep 28 2020)` <br/>
&nbsp;&nbsp;&nbsp;&nbsp;`<=== [D][X] math homework (by: Sep 29 2020, 11:59pm)` <br/>

***
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.
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