Skip to content

Darren Tng iP #622

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

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
556af3f
Add Gradle support
May 24, 2020
f48d717
v1.0
DarrenCsAcc Aug 21, 2022
7f448f9
V 2.0
DarrenCsAcc Aug 21, 2022
a2fd254
Finished level 2 and edited some code from level 1.Like the display m…
DarrenCsAcc Aug 22, 2022
5a8b5e6
Finish Task
DarrenCsAcc Aug 24, 2022
16c28b1
testing the branch
DarrenCsAcc Aug 29, 2022
da5e01f
Finished level 4
DarrenCsAcc Aug 29, 2022
340da3e
done with Automated Text UI Testing
DarrenCsAcc Aug 30, 2022
48b8aaf
Finished the duke exception leve 1-5
DarrenCsAcc Aug 30, 2022
7131ee5
Finished the delete level.Done with week 2
DarrenCsAcc Aug 30, 2022
930928d
Week 2 updated
DarrenCsAcc Aug 30, 2022
8ab7b93
Fixed some stuff before entering in level 7
DarrenCsAcc Sep 6, 2022
fc9316e
Fixed location of master branch
DarrenCsAcc Sep 6, 2022
222151f
See if can push to new repo
DarrenCsAcc Sep 8, 2022
76bee7a
Finished level 7
DarrenCsAcc Sep 9, 2022
1f58cd1
Try push to github
DarrenCsAcc Sep 9, 2022
77a362e
Merge branch 'branch-Level-4' into branch-Level-7
DarrenCsAcc Sep 10, 2022
cbedebf
Merge branch 'branch-Level-7'
DarrenCsAcc Sep 10, 2022
d5ac7ba
Tring to merge all branches
DarrenCsAcc Sep 10, 2022
b64abc5
Level-8 completed
DarrenCsAcc Sep 12, 2022
d696639
Completed more oop
DarrenCsAcc Sep 16, 2022
199b637
Merge master into level 8
DarrenCsAcc Sep 16, 2022
e56446b
Merge branch 'master' into Level-8
DarrenCsAcc Sep 16, 2022
016bb87
Added duke package
DarrenCsAcc Sep 16, 2022
92ea3e7
Duke package done
DarrenCsAcc Sep 16, 2022
2c99b01
testing
DarrenCsAcc Sep 16, 2022
54af897
Merge remote-tracking branch 'origin/add-gradle-support'
DarrenCsAcc Sep 16, 2022
ae022ac
Finished A-JUnit
DarrenCsAcc Sep 16, 2022
ce8d32b
Finished creating the JAR file
DarrenCsAcc Sep 16, 2022
e61a863
added java docs
DarrenCsAcc Sep 16, 2022
abc0ac1
Improved the coding quality.A-CodingStandard
DarrenCsAcc Sep 17, 2022
467c078
Finished Level-9 find
DarrenCsAcc Sep 17, 2022
6d66e8c
Have a GUI level 10
DarrenCsAcc Sep 18, 2022
d4870da
Manage to get the GUI working and incorporated with duke.
DarrenCsAcc Sep 19, 2022
9b76ae6
added necessary bcd extensions that will help the user with what to do:
DarrenCsAcc Sep 19, 2022
32c6c98
Manage to finish user guide and showed image on how the actual produc…
DarrenCsAcc Sep 19, 2022
9804ad2
Update README.md
DarrenCsAcc Sep 19, 2022
129af78
Final prodcut
DarrenCsAcc Sep 19, 2022
326d5db
Merge remote-tracking branch 'origin/master' into branch-A-Assertions
DarrenCsAcc Sep 19, 2022
c9fb47e
Fixed the delete
DarrenCsAcc Sep 19, 2022
0463151
Changed Ui.png to correct location
DarrenCsAcc Sep 19, 2022
cd09218
Added Ui.png to the correct place(hopefully)
DarrenCsAcc Sep 19, 2022
e9b2b3e
fixed camel casing and naming
DarrenCsAcc Oct 15, 2022
913fa6b
Fixed bugs
DarrenCsAcc Oct 15, 2022
94fa83d
updated the user guide
DarrenCsAcc Oct 16, 2022
e1f3bfb
update
DarrenCsAcc Oct 20, 2022
3077f74
Added valid test
DarrenCsAcc Oct 21, 2022
b4ce9b8
Added valid Test
DarrenCsAcc Oct 21, 2022
a741ed8
Added more comments
DarrenCsAcc Oct 21, 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
3 changes: 3 additions & 0 deletions 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

Binary file added Ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
plugins {
id 'java'
id 'application'
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'
}

test {
useJUnitPlatform()

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

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

application {
mainClassName = "seedu.duke.Duke"
}

shadowJar {
archiveBaseName = "duke"
archiveClassifier = null
}

run{
standardInput = System.in
}

repositories {
mavenCentral()
}

dependencies {
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'
}

application {
mainClassName = "duke.Launcher"
}
114 changes: 103 additions & 11 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,121 @@
# User Guide
Here is Duke, a friendly task manager robot!

## Features
Manage tasks
Duke helps you to keep track of 3 types of tasks: Todos, Events and Deadlines.
You can add a new task or delete an old task.
You can also mark a task as completed.

### Feature-ABC
Delete task
Once you are done with task you can remove it from the list by deleting it.

Description of the feature.
Find tasks
Duke can search for a specific task stored in the task list based on the keyword that the user enters.

### Feature-XYZ
Auto-Save
Duke automatically saves all tasks in your local storage, you can be assured your task list will be saved when you close the application.
It will automatically be loaded up when you open the application again!

Description of the feature.
Dates
Duke is able to read and understand dates but specific commands must be used which is not written here.
It is in the code base for now.

## Usage
## Usages

### `Keyword` - Describe action
### `Todo` - Creates a todo task

Describe the action and its outcome.
Adds a new "todo" into your task list.

Example of usage:
Sample command: todo workout

`keyword (optional arguments)`
```
expected output
```
`Got it. I've added this task:
[T][X] workout
Now you have 1 tasks in the list.`

### `event <description> /at String` - Creates an event task

Adds a new event into your task list.

Sample command: event meeting john /at 8-8-2023

Expected outcome:
```
expected output
```
`Got it. I've added this task:
[E][X] meeting john (at:8-8-2023)
Now you have 2 task(s) in the list.`

Description of the outcome.
### `deadline <description> /by String` - Creates a deadline task

Adds a new deadline into your task list.

Sample command: deadline math homework /by 6-6-2023

```
expected output
```
`Okay! I've added this task:
[D][X] math homework (by:6-6-2023)
Now you have 3 task(s) in the list.`


### `List` - Show all current objects in the list

List all objects in the task list.

Sample command: list

```
expected output
```
`1.[T][X] workout
2.[E][X] meeting john (at:8-8-2023)
3.[D][X] math homework (by:6-6-2023)`

### `mark` - mark a task

Marks a task as done by index.

Sample command: mark 1

```
expected output
```
`Nice! I've mark this task as done:
[/] workout`

### `delete` <index> - Delete an object of specific index from the list

Deletes a task by index from the list.

Sample command: delete 2

```
expected output
```
`Noted. I've remove this task:
[E][] meeting john (at:8-8-2023)
Now you have 2 task(s) in the list.`

## find <keyword> - Searches for tasks

Search for a task that match the keyword

Sample command: `find math`

```
expected output
```
Here are the task(s) with your keyword!
`1.[D][X] math homework (by:6-6-2023)`

### `bye` - Quits the application

Exits the application



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
183 changes: 183 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn () {
echo "$*"
}

die () {
echo
echo "$*"
echo
exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option

if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

exec "$JAVACMD" "$@"
Loading