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

[Brian Chow] iP #296

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
487213c
Level-1
brian16600 Jan 19, 2022
63bd8fe
Level-2. Changed the return values of levelOneRespond and implemented…
brian16600 Jan 20, 2022
63b7384
Level-3
brian16600 Jan 20, 2022
5188549
Level-3
brian16600 Jan 20, 2022
629d77c
Level-3
brian16600 Jan 21, 2022
62a2177
Level-4.
brian16600 Jan 26, 2022
49d9e0a
Level-5.
brian16600 Jan 29, 2022
89c0746
Level-6
brian16600 Jan 29, 2022
22f31af
Level-7
brian16600 Feb 2, 2022
a2b7ffd
Level-8
brian16600 Feb 3, 2022
3c16b7b
Added Parser, Storage and Tasklist
brian16600 Feb 5, 2022
633dca6
Added TaskList and Parser classes. TaskList contains the arraylist of…
brian16600 Feb 5, 2022
38a2462
Added more OOP and documentation
brian16600 Feb 5, 2022
e129edd
Added packages: duke.duke, duke.ui, duke.storage and duke.task
brian16600 Feb 5, 2022
cd020f5
Merge branch 'add-gradle-support'
brian16600 Feb 5, 2022
6ace068
Added add-gradle-support branch by merging into master
brian16600 Feb 5, 2022
33617d4
Ensured javadoc documentation is complete for all methods
brian16600 Feb 5, 2022
6da11ff
Added InputHandlerTest.java and TaskListTest.java
brian16600 Feb 6, 2022
ae099f5
Added NumberFormatException handling for delete, unmark and mark if n…
brian16600 Feb 6, 2022
390edec
Changed formatting for coding standards based on feedback
brian16600 Feb 6, 2022
2607baf
Added find and NumberFormatException in cases where non-integer is pa…
brian16600 Feb 6, 2022
aca80eb
Added JAR functionality
brian16600 Feb 12, 2022
f97ff93
Shifted into packages
brian16600 Feb 12, 2022
bb37f21
revert
brian16600 Feb 12, 2022
255fbef
Tentative changes
brian16600 Feb 12, 2022
b4458cc
Adding Duke GUI
brian16600 Feb 15, 2022
3960ddc
Add Assertions
brian16600 Feb 15, 2022
9bd5f23
Clean up text-ui-test
brian16600 Feb 15, 2022
ee148e4
Tentative changes to code quality
brian16600 Feb 15, 2022
5344d8e
Improve Code Quality based on Issue Tracker
brian16600 Feb 16, 2022
747cd67
Merge pull request #2 from brian16600/branch-A-CodeQuality
brian16600 Feb 16, 2022
fee4ebb
Update README.md
brian16600 Feb 17, 2022
e1dec30
Update README.md
brian16600 Feb 17, 2022
c126d99
Create README.md
brian16600 Feb 17, 2022
133c672
Update README.md
brian16600 Feb 17, 2022
5d7d4fb
Update README.md
brian16600 Feb 17, 2022
87677f2
Update README.md
brian16600 Feb 17, 2022
805ab54
Update README.md
brian16600 Feb 17, 2022
effc8c7
Update README.md
brian16600 Feb 17, 2022
5e3b5c9
Update README.md
brian16600 Feb 17, 2022
9004041
Temporary addition of Snooze.
brian16600 Feb 17, 2022
4c29aa2
Add snooze command
brian16600 Feb 17, 2022
68e9fea
Merge branch 'master' of https://github.com/brian16600/ip
brian16600 Feb 17, 2022
436be42
Add Ui.png
brian16600 Feb 17, 2022
38d5c9a
Add Ui.png
brian16600 Feb 17, 2022
56d537e
Update README.md
brian16600 Feb 17, 2022
18b7995
Update README.md
brian16600 Feb 17, 2022
ca00570
Update README.md
brian16600 Feb 17, 2022
4460756
Update README.md
brian16600 Feb 17, 2022
a58d8da
Update README.md
brian16600 Feb 17, 2022
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
48 changes: 36 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,43 @@
# Duke project template
# Duke

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.
Duke is a interactive chatbot with UI.
> "Your mind is for having ideas, not holding them" - David Allen

## Setting up in Intellij
Duke is a task tracker that can track three categories of tasks:
- Todo
- Deadline
- Event

Prerequisites: JDK 11, update Intellij to the most recent version.
## Setting up

1. Open Intellij (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project first)
1. Open the project into Intellij as follows:
1. Click `Open`.
1. Select the project directory, and click `OK`.
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:
Setting up Duke is extremely easy. All you need to do is:
1) Download JDK 11 and above from [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk)
2) Download the latest JAR file release from the right side of this repository
3) Run the command java -jar ip.jar

It's that simple! :)

## Commands
There are a few commands you can run in Duke. These include:
- [x] todo
- [X] deadline
- [X] event
- [X] delete
- [X] list
- [X] find
- [X] bye

## Using an IDE
You can further edit/modify Duke by navigating to the `src` folder which contains all the `java` files

You can run it from Launcher.java by using __main__:
<pre>
public class Launcher {
<b>public static void main(String[] args)</b> {
Application.launch(Main.class,args);
}
}
</pre>
```
Hello from
____ _
Expand Down
61 changes: 61 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
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.Duke"
}

shadowJar {
archiveBaseName = "duke"
archiveClassifier = null
}

checkstyle {
toolVersion = '8.29'
}

run{
standardInput = System.in
enableAssertions = true;
}
128 changes: 117 additions & 11 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,135 @@
# User Guide
Duke is a interactive chatbot with UI.
> “Software and cathedrals are much the same; first we build them, then we pray.”

Duke is a task tracker that can track three categories of tasks:
- Todo
- Deadline
- Event

## Features
1. `todo`
2. `deadline`
3. `event`
4. `list`
5. `delete`
6. `mark`
7. `unmark`
8. `snooze`
9. `bye`

### Feature-ABC
## Usage

Description of the feature.
## `todo NAME` - creates a Todo task with name NAME

### Feature-XYZ
Example of usage:

Description of the feature.
`todo work`

## Usage
Expected outcome:

### `Keyword` - Describe action
Expected outcome:
Creates a new Todo object called work
*Take note of the space between todo and NAME!

Describe the action and its outcome.

Example of usage:
## `deadline NAME /by DATE TIME(optional)` - creates a Deadline task with name NAME at DATE and TIME

Example of usage:
```
deadline report submission /by 2022-02-14 23:59
deadline report submission /by 2022-02-14
```

Expected outcome:
Creates a new Deadline object with DATE and TIME(optional)
*Format of date: yyyy-mm-dd
*Format of time: hh:mm


## `event NAME /at DATE TIME(optional)` - creates a Event task with name NAME at DATE and TIME

Example of usage:
```
event meeting /at 2022-02-12 01:00
event meeting /at 2022-02-12
```

Expected outcome:
Creates a new Event object with DATE and TIME(optional)
*Format of date: yyyy-mm-dd
*Format of time: hh:mm


## `list` - lists out all tasks

Example of usage:
```
list
```

Expected outcome:
A list of all tasks in their respective formats


## `delete INDEX` - deletes task at specific INDEX

`keyword (optional arguments)`
Example of usage:
```
delete 1
```

Expected outcome:
Delete task from tasklist and prints the deleted task
*Recommended to use alongside `list` command so that you get the right index
*Important to delete a valid index - Do not go out of bounds!


## `mark INDEX` - marks task as done

Example of usage:
```
mark 0
```

Expected outcome:
Marks task and prints the marked task
*Recommended to use alongside `list` command so that you get the right index


## `unmark INDEX` - marks task as undone

Example of usage:
```
unmark 0
```

Expected outcome:
Marks task and prints the marked task
*Recommended to use alongisde `list` command so that you get the right index


## `snooze NAME DATE /t NEWDATE NEWTIME` - changes the date & time of task

Example of usage:
```
snooze meeting 2022-02-12 /t 2022-03-20 23:59
```

Expected outcome:
Sets new task date and time and prints new date and time for task

_ _Keeping track of the exact time is difficult_ _, which is why all you need to input is the date of the task and not the time.
*Getting the exact name and date of the task is important


Description of the outcome.
## `bye` - ends the program

Example of usage:
```
expected output
bye
```

Expected outcome:
Duke sends a goodbye message and exits the program, closing the UI

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