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

Branch b find free times #500

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
556af3f
Add Gradle support
May 24, 2020
20e22fc
test commit 2
daniellingzy Feb 17, 2023
c556405
level_1
daniellingzy Feb 17, 2023
8cf49f7
Added new features for Level-2: Storing String messages in list, and …
daniellingzy Feb 18, 2023
cfde39a
Level-3 (first attempt)
daniellingzy Feb 18, 2023
dfc7d8e
Implemented Todo, Deadline, Event classes.
daniellingzy Feb 20, 2023
a88f887
Fixed bug for print statement in "mark as done" feature.
daniellingzy Feb 20, 2023
0b382ab
updated TestUiTesting.
daniellingzy Feb 21, 2023
085c71b
Added Level-5 features
daniellingzy Feb 23, 2023
46a8438
Added Level-6 features.
daniellingzy Feb 23, 2023
7f1e659
Level-7 features: implemented, yet to be tested.
daniellingzy Feb 25, 2023
df950c4
Level-7 features completed.
daniellingzy Feb 25, 2023
33518d9
Level-8 Features completed.
daniellingzy Feb 27, 2023
052955e
Prelim Attempt on A-MoreOOP
daniellingzy Feb 27, 2023
a9796e0
Attempt on MoreOOP
daniellingzy Feb 27, 2023
3b1c7c8
MoreOOP in progress
daniellingzy Feb 27, 2023
7dfb789
More-OOP in progress.
daniellingzy Mar 8, 2023
2aeb675
More-OOP completed.
daniellingzy Mar 8, 2023
cd20336
completed A-Packages
daniellingzy Mar 8, 2023
34e1d95
"essential merge for gradle support"
daniellingzy Mar 8, 2023
99cb61e
update gradle
daniellingzy Mar 8, 2023
c636f26
Implemented Gradle to build and run program
daniellingzy Mar 9, 2023
b9848a8
new branch for implementing JUnit
daniellingzy Mar 13, 2023
e1d41e7
Updated JUnit Testcases
daniellingzy Mar 16, 2023
9f35a01
updated dependencies in build.gradle
daniellingzy Mar 16, 2023
51c6f44
Added JavaDoc
daniellingzy Mar 16, 2023
136bc53
Implemented Level-9 Find feature
daniellingzy Mar 16, 2023
5e9e0f2
Implemented Level-9
daniellingzy Mar 17, 2023
b3cab8d
Update README.md
daniellingzy Mar 21, 2023
e102f73
Update README.md
daniellingzy Mar 21, 2023
8c7be0c
Update README.md
daniellingzy Mar 21, 2023
d0938d5
Update README.md
daniellingzy Mar 21, 2023
cc40dde
Checkstyle on hold
daniellingzy Mar 21, 2023
82fa797
started GUI
daniellingzy Mar 22, 2023
5cda1b7
implemented GUI
daniellingzy Mar 23, 2023
99c45b7
update
daniellingzy Mar 23, 2023
1bccfb7
"update"
daniellingzy Mar 23, 2023
f54d1b2
Replace Ui class with new Gui class
daniellingzy Mar 24, 2023
6a7345b
Replace Ui class with new Gui class
daniellingzy Mar 24, 2023
c22d6e1
Storage class: Use assert to validate filepath
daniellingzy Mar 25, 2023
4bc5a07
Merge branch 'master' of github.com:daniellingzy/ip
daniellingzy Mar 25, 2023
700e06c
update
daniellingzy Mar 25, 2023
4c59659
add assert
daniellingzy Mar 25, 2023
d542581
Merge pull request #3 from daniellingzy/branch-A-Assertions
daniellingzy Mar 25, 2023
a8843eb
update
daniellingzy Mar 25, 2023
b72ffb7
Update README.md
daniellingzy Mar 25, 2023
54422b4
Update README.md
daniellingzy Mar 25, 2023
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
45 changes: 32 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,40 @@
# Duke project template
# BrotherBot

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.
> "We must live together as brothers or perish together like fools." - Martin Luther King Jr.

## Setting up in Intellij
We all need a brother out there who's got our back all the time. Introducing BrotherBot, your one-stop task planner with a "Brother" personality.

Prerequisites: JDK 11, update Intellij to the most recent version.
Bro! It is:

- ~~Hard~~ Easy to use
- *Friendly*
- Treats u like a real **bro** :star_struck:

## Wanna gain real bro?

1. Download it [here]()

## Bro features


- [X] Tracks tasks
- [ ] Eat supper with you *(coming soon)*

If you are a Java programmer, you can review the code easily with its well designed code and JavaDocs. Here's the `Launcher` class:
```
package brotherbot;

import javafx.application.Application;

public class Launcher {
public static void main(String[] args) {
Application.launch(BrotherBot.class, args);
}
}
```

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
Adapted from
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
Expand Down
59 changes: 59 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '5.1.0'
}

repositories {
gradlePluginPortal()
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'

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 = "brotherbot.Launcher"
}

shadowJar {
archiveBaseName = "Launcher"
archiveClassifier = null
}

run {
standardInput = System.in
enableAssertions = true
}

1 change: 1 addition & 0 deletions data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1. [T] [ ] test
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.2-all.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