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

[Cao] iP #466

Open
wants to merge 70 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
a0828cb
Added features for Greet, Echo and Exit
Aug 20, 2020
2a955ed
Added features of Level-2, Add and List
Aug 20, 2020
2960cdb
Added done feature, but not achieved
Aug 20, 2020
e6f5a1b
Add package main.java
Aug 30, 2020
d619ffa
Adjusted the robot's responding style
Aug 30, 2020
7a01956
Added a Task class, but did not merge it with the main class Duke.java
Aug 30, 2020
23ff51e
added printDescription() method to Task class
Aug 30, 2020
aaf0db0
Merged Task.java class with Duke.java class, completed features for l…
Aug 30, 2020
b989315
Added classes Todo, Deadline, Event.
Aug 30, 2020
46c1cf5
Added feature for Automated Text UI Testing
Aug 30, 2020
bf02861
Added feature for Exception handling
Sep 2, 2020
9ed888d
Handled exceptions for deadline
Sep 3, 2020
4630050
updated exceptions handling for event
Sep 3, 2020
eccd4bd
Finished delete function
Sep 3, 2020
518a798
Handled exception for Done
Sep 3, 2020
3d92ca2
Updated exception handling for delete operation
Sep 3, 2020
488eaec
Saved the list of tasks in a txt. file. Every time will load the data…
Sep 7, 2020
74ae682
solved the bug when the command.txt does not exist.
Sep 7, 2020
fc5812c
Stored Deadline data as java.time.LocalDate
Sep 9, 2020
fd6a9b3
Merge branch 'branch-Level-7'
Sep 9, 2020
9528c06
Merge branch 'branch-Level-8'
Sep 9, 2020
b6efb63
Revise the OOP of the project
Ringo1225 Sep 9, 2020
ecd9609
Add Junit test cases
Ringo1225 Sep 9, 2020
7dbaa04
add jar file on github
Ringo1225 Sep 9, 2020
ad53f61
Adds java docs
Ringo1225 Sep 9, 2020
2a51b71
Tweak the code to comply with a coding standard
Ringo1225 Sep 9, 2020
18690fd
Add find feature
Ringo1225 Sep 9, 2020
48642d3
Merge branch 'branch-A-JavaDoc'
Ringo1225 Sep 9, 2020
500c754
Merge branch 'branch-A-CodingStandard'
Ringo1225 Sep 9, 2020
4e5da11
Merge branch 'branch-Level-9'
Ringo1225 Sep 9, 2020
04d380f
Use Gradle to automate some of the build tasks of the project.
Ringo1225 Sep 9, 2020
da7df49
Merge branch 'branch-A-Gradle'
Ringo1225 Sep 9, 2020
e9dc761
Revise the project structure
Ringo1225 Sep 9, 2020
d743259
Revise project structure
Ringo1225 Sep 13, 2020
e9542b0
Edit build.gradle
Ringo1225 Sep 13, 2020
88955d9
Add some GUI feature
Ringo1225 Sep 16, 2020
64d7ccd
Improve GUI
Ringo1225 Sep 16, 2020
a2fe141
Restructure Parser
Ringo1225 Sep 16, 2020
03db3d5
fix bug for some operation
Ringo1225 Sep 17, 2020
6177d62
Merge branch 'master' into branch-GUI
Ringo1225 Sep 17, 2020
6ed168a
Finish GUI feature
Ringo1225 Sep 17, 2020
6703d18
Restructure project
Ringo1225 Sep 17, 2020
4867fea
Add FXML
Ringo1225 Sep 17, 2020
600c0da
Merge branch 'branch-GUI'
Ringo1225 Sep 17, 2020
31edbef
Try to create a jar file
Ringo1225 Sep 17, 2020
c24a998
Add assertions
Ringo1225 Sep 18, 2020
7dd194a
Improve code quality
Ringo1225 Sep 18, 2020
a99084c
Add feature: FixedDurationTasks
Ringo1225 Sep 18, 2020
3f9875b
Merge pull request #3 from Ringo1225/branch-A-Assertions
Ringo1225 Sep 18, 2020
2b5a07c
Merge branch 'master' of https://github.com/Ringo1225/ip
Ringo1225 Sep 18, 2020
4e15055
Merge branch 'master' into branch-A-CodeQuality
Ringo1225 Sep 18, 2020
ce96300
Merge branch 'branch-A-CodeQuality' into branch-B-FixedDurationTasks
Ringo1225 Sep 18, 2020
19baa19
Merge pull request #1 from Ringo1225/branch-A-CodeQuality
Ringo1225 Sep 18, 2020
25b7998
Merge branch 'master' of https://github.com/Ringo1225/ip
Ringo1225 Sep 18, 2020
1e4cdf2
Merge branch 'master' into branch-B-FixedDurationTasks
Ringo1225 Sep 18, 2020
1046b5e
Merge pull request #2 from Ringo1225/branch-B-FixedDurationTasks
Ringo1225 Sep 18, 2020
19b36fb
Merge branch 'master' of https://github.com/Ringo1225/ip
Ringo1225 Sep 18, 2020
cf73057
Add reuse acknowlegement
Ringo1225 Sep 18, 2020
4037756
Add Ui.png
Ringo1225 Sep 18, 2020
1655726
Update user guide
Ringo1225 Sep 18, 2020
4b7aeb1
Set theme jekyll-theme-minimal
Ringo1225 Sep 18, 2020
74aa3da
Revise user guide
Ringo1225 Sep 18, 2020
cbb962b
Merge branch 'master' of https://github.com/Ringo1225/ip
Ringo1225 Sep 18, 2020
3457ff4
Revise User Guide
Ringo1225 Sep 18, 2020
8e00007
Revise User Guide
Ringo1225 Sep 18, 2020
9a57b7a
Set theme jekyll-theme-midnight
Ringo1225 Sep 18, 2020
5513e6d
revise build.gradle, generate a jar file
Ringo1225 Sep 18, 2020
bd54f7a
Merge branch 'master' of https://github.com/Ringo1225/ip
Ringo1225 Sep 18, 2020
777b9e0
update jar file version
Ringo1225 Sep 18, 2020
1615411
Set theme jekyll-theme-minimal
Ringo1225 Oct 10, 2020
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: main.java.Launcher

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

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


mainClassName = "main.java.Launcher"

shadowJar {
archiveBaseName = "duke"
archiveClassifier = null
}

run{
standardInput = System.in
}


version = "0.2"
4 changes: 4 additions & 0 deletions command.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
D|1| play |2020-09-08
D|0| read this |2020-09-08
F|1| read that |4.00
F|0| read book |2.00
Empty file.
141 changes: 133 additions & 8 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,145 @@
# User Guide

## Features

### Feature 1
Description of feature.
### Feature
#### Duke
A robot named Duke who helps you to manage your tasks.
You can simply type in your command, ask Duke to add a task, set a deadline or record a event timing.

## Usage

### `Keyword` - Describe action
### `list` - list all the tasks in your todo list
Duke will list all the tasks in your todo list.

Example of usage:

`list`

Expected outcome:

`Here are the tasks in your list:`

`1.[T][✓] read book`

`2.[D][✓] return book (by: Oct 10 2020)`

`3.[E][✘] project meeting (at: Aug 6th 2-4pm)`


### `done` - mark your corresponding tasks as done
Duke will mark your corresponding tasks as done

Example of usage:

`done 3`

Expected outcome:

`Nice! I've marked this task as done:`

`[E][✓] project meeting (at: Aug 6th 2-4pm)`


### `delete` - delete a task from your todo list
Duke will delete a task from your todo list

Example of usage:

`delete 3`

Expected outcome:

`Noted! I've removed this task:`

`[E][✘] project meeting (at: Aug 6th 2-4pm)`

`Now you have 3 tasks in the list.`


### `todo` - simply add a task
Duke will simply add a task

Example of usage:

`todo read book`

Expected outcome:

`Got it. I've added this task:`

`[T][✘] read book`

`Now you have 1 tasks in the list.`


### `deadline` - add a task with a specific deadline
Duke will add a task with a specific deadline

Example of usage:

`deadline return book /by 2020-10-10`

Expected outcome:

`Got it. I've added this task:`

`[D][✘] return book (by: Oct 10 2020)`

`Now you have 2 tasks in the list.`


### `event` - add a task that happens at the time you give
Duke will add a task that happens at the time you give

Example of usage:

`event return book /at tonight`

Expected outcome:

`Got it. I've added this task:`

`[E][✘] return book (at: tonight)`

`Now you have 2 tasks in the list.`


### `FDTask` - add a task with a fixed duration
Duke will add a task with a fixed duration

Example of usage:

`FDTask read book /for 2`

Expected outcome:

`Got it. I've added this task:`

`[F][✘] read book (needs 2.00 hours)`

`Now you have 2 tasks in the list.`


### `find` - find the task with the given keyword
Duke will find the task with the given keyword

Example of usage:

`find book`

Expected outcome:

`Here are the matching tasks in your list:`

`1.[F][✘] read book (needs 2.00 hours)`


Describe action and its outcome.
### `bye` - say goodbye to Duke.
Duke will update you background memory with your current todo list

Example of usage:

`keyword (optional arguments)`
`bye`

Expected outcome:

`outcome`
`Bye. Hope to see you again soon!`
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.
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-minimal
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.0.1-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