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

[Ryan-Reno] iP #532

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
55f9f9f
docs/README.md: Tweak document template
Jan 7, 2024
f837ddb
Add Gradle support
May 24, 2020
a6f7324
Bump gradle and lib version
Eclipse-Dominator Aug 5, 2023
914b0da
Renamed the chatbot
Feb 7, 2024
3883a94
Added greeting and exits automatically
Feb 7, 2024
a53b53c
Added echo
Feb 7, 2024
f779cb6
Added a list that stores tasks
Feb 7, 2024
b476b0e
Added markings for tasks
Feb 7, 2024
6720e2c
Added todo, deadline, and event
Feb 7, 2024
7cde4a5
Added automatic Text UI Testing
Feb 7, 2024
b8e8a40
Added exception handling for invalid inputs
Feb 7, 2024
26a563c
Added delete task functionality
Feb 7, 2024
74b371d
Add save mechanism for task list
Ryan-Reno Feb 13, 2024
967b214
Merge branch 'branch-level-7'
Ryan-Reno Feb 13, 2024
a70afdd
Abstracted more classes to adhere with OOP principles
Ryan-Reno Feb 13, 2024
3b251c2
Divide classes into packages
Ryan-Reno Feb 13, 2024
7cfdf32
Merge branch 'add-gradle-support'
Ryan-Reno Feb 13, 2024
8d06856
Add JUnit testing for Event and Task
Ryan-Reno Feb 13, 2024
5a4b61a
Add JavaDocs
Ryan-Reno Feb 13, 2024
d72286d
Merge branch 'branch-A-JavaDoc'
Ryan-Reno Feb 13, 2024
c242028
Followed coding standards
Ryan-Reno Feb 13, 2024
478a06a
Add find functionality to find a task by a keyword
Ryan-Reno Feb 13, 2024
a5a756e
Merge branch 'branch-A-CodingStandard'
Ryan-Reno Feb 13, 2024
c17cb99
Merge branch 'branch-Level-9'
Ryan-Reno Feb 13, 2024
fbcab40
Task stores date and time instead of string
Ryan-Reno Feb 14, 2024
b42ffb8
Refactor methods to adhere with OOP
Ryan-Reno Feb 14, 2024
9aee97a
Change EventTest to fit with new output
Ryan-Reno Feb 14, 2024
6e47af2
Implement GUI with JavaFX and FXML
Ryan-Reno Feb 14, 2024
93cef7e
Merge branch 'branch-Level-10'
Ryan-Reno Feb 14, 2024
e01bd29
Use assert in Ui to ensure important assumptions
Ryan-Reno Feb 15, 2024
c182ae8
Improve code quality by creating Parser class
Ryan-Reno Feb 15, 2024
1edcad5
Merge pull request #1 from Ryan-Reno/branch-A-CodeQuality
Ryan-Reno Feb 15, 2024
322878f
Detect duplicate tasks
Ryan-Reno Feb 15, 2024
0ba61c0
Merge pull request #2 from Ryan-Reno/branch-BCD-Extension
Ryan-Reno Feb 15, 2024
cbfab43
Fix DialogBox height limit and add bye command
Ryan-Reno Feb 18, 2024
5d89871
Merge branch 'branch-BCD-Extension'
Ryan-Reno Feb 18, 2024
d35be93
Add JavaDocs to methods
Ryan-Reno Feb 18, 2024
328fdfa
Add User Guide
Ryan-Reno Feb 18, 2024
c21a0ce
Add Ui.png to the user guide
Ryan-Reno Feb 20, 2024
6b96869
Add picture to the website
Ryan-Reno Feb 20, 2024
7ef6d4a
Add greetings when first opening the app
Ryan-Reno Feb 20, 2024
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ src/main/resources/docs/
*.iml
bin/

/data/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT
211 changes: 187 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,187 @@
# 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.

## Setting up in Intellij

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

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:
```
Hello from
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
| |_| | |_| | < __/
|____/ \__,_|_|\_\___|
```
# Lite User Guide

Lite is a user-friendly chatbot, especially designed towards
forgetful students to keep track of their ToDos, Events, and Deadlines.
Lite will be able to keep track the dates and status of completion of tasks,
allowing better planning for your future tasks.

## Downloading and running the file
Prerequisite: Ensure that java and JDK 11 is downloaded on your computer

1. Go to Releases > iP v0.2 > lite.jar
2. Run lite.jar by typing ./lite.jar or java -jar lite.jar in the Terminal

## List of Features

- [x] Adding ToDo task
- [x] Adding Event task
- [x] Adding Deadline task
- [x] Mark tasks as done
- [x] Unmark tasks as undone
- [x] Keep track and list out all of the added tasks
- [x] Delete tasks from the list
- [x] Find a task using a keyword
- [x] Close the program
- [ ] Reminder (Coming soon)


## Adding Todo task

Allows users to add a ToDo task that has no date.

Format: todo [description]

Example: `todo return a book`

Expected output:

```
Got it. I've added this task:
[T][] return a book
Now you have <x> tasks in the list
```

## Adding Deadline Task

Allows users to add a Deadline task that has a due date.

Format: deadline [DESCRIPTION] /by [DATE].
- The date has to be in the format of YYYY-MM-DD, and a time from 00:00 to 23:59.

Example: deadline 2103T Assignment /by 2024-02-20 23:59


Expected output:

```
Got it. I've added this task:
[D][] 2103T Assignment (by: FEBRUARY 20 2024 23:59)
Now you have <x> tasks in the list
```


## Adding Event Task

Allows users to add a Event task that has a start date and end date.

Format:event [DESCRIPTION] /from [DATE] /to [DATE]
- The date has to be in the format of YYYY-MM-DD, and a time from 00:00 to 23:59.

Example: event 2101 group meeting /from 2024-02-20 17:30 /to 2024-02-20 18:30


Expected output:

```
Got it. I've added this task:
[E][] 2101 group meeting (from: FEBRUARY 20 2024 17:30 to:
FEBRUARY 20 2024 18:30)
Now you have <x> tasks in the list
```

## Mark Tasks as Done

Allow users to mark their tasks as completed

Format: mark INDEX

Example: mark 1

Assuming that the very first task you added was the ToDo task of returning a book,
this is the expected output:

```
This task has been marked as done!
[T][X] return a book
```

## Unmark Tasks

Similarly, you can also unmark your tasks to undo it. This is mainly to undo
if you incorrectly marked your task as done.

Format: unmark INDEX

Example: unmark 1

Assuming that the very first task you added was the ToDo task of returning a book,
this is the expected output:

```
This task has been unmarked!
[T][] return a book
```

## List out all the tasks added

Allow users to see the list of tasks that they have added so far.
It also keeps track of the tasks that may have been added before

Format: list

Assuming that you had added a todo, deadline, and event task in that respective order,
this is the expected output:

```
1. [T][] return a book
2. [D][] 2103T Assignment (by: FEBRUARY 20 2024 23:59)
3. [E][] 2101 group meeting (from: FEBRUARY 20 2024 17:30 to:
FEBRUARY 20 2024 18:30)
```


## Delete Tasks

Allow users to delete the tasks that are in the list

Format: delete INDEX

Example: delete 1

Assuming that the very first task you added was the ToDo task of returning a book,
this is the expected output:

```
Noted. I've removed this task:
[T][] return a book
Now you have <x> tasks in the list
```

Also note that if you delete a task, all the index after that task will drop by 1.
So if you had added all a todo, deadline, event tasks all in order, calling list will result in this output:

```
Here are the tasks in your list:
1. [D][] 2103T Assignment (by: FEBRUARY 20 2024 23:59)
2. [E][] 2101 group meeting (from: FEBRUARY 20 2024 17:30 to:
FEBRUARY 20 2024 18:30)
```

## Finding a task using a keyword
Allow users to find a task that contains a specified word

Format: find [KEYWORD]
- The search is case-sensitive e.g book will not find Book
- The search uses partial search e.g gro will find group


Example: find Assignment

Expected output:
```
Here are the matching tasks in your list:
1. [D][] 2103T Assignment (by: FEBRUARY 20 2024 23:59)
```


## Terminating the program
Aside from clicking the X button on the top right, you can also provide
a command to close the app. This command is "bye" (without the " ")

Format: bye


Note that it is case-sensitive, so it must be exactly the same as bye



57 changes: 57 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}


repositories {
mavenCentral()
}

dependencies {
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.10.0'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.10.0'
String javaFxVersion = '17.0.7'

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 {
mainClass.set("lite.Lite")
}

shadowJar {
archiveBaseName = "lite"
archiveClassifier = null
dependsOn("distZip", "distTar")
}

run{
standardInput = System.in
}
Loading