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

[Karan Dev Sapra] Duke Increments #356

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
65f72a8
Add support for Gradle workflow
j-lum Aug 6, 2019
0112efe
Add sample checkstyle configuration
j-lum Aug 12, 2019
cfd6da7
Change file mode on `gradle` to be executable
j-lum Aug 18, 2019
6e6ace1
Merge pull request #12 from j-lum/gradle+x
j-lum Aug 18, 2019
a3ca5a4
Add configuration for console applications
j-lum Aug 20, 2019
7b60e81
Merge pull request #13 from j-lum/javaexec
j-lum Aug 21, 2019
6dfbb70
Level-1
Aug 26, 2019
87fb84e
Level-1
Aug 26, 2019
24796d0
Level-2
Aug 26, 2019
f302e6b
Level-2
Aug 26, 2019
e5ec66b
Level-3
Aug 26, 2019
76204fe
Level-4
Aug 27, 2019
9a81e57
Level-5
Aug 27, 2019
4ff446c
Level-6
Aug 27, 2019
a504967
Level-7
Aug 28, 2019
0ec0fe4
Level-8
Aug 28, 2019
1a541a9
Merge branch 'branch-Level-8'
Aug 28, 2019
e26dc70
Level-7 (removing a few print lines that I had put for debugging)
Aug 28, 2019
313de67
Merge branch 'master' into branch-Level-7
Aug 28, 2019
9559d8a
Level-8 (won't display error message if the date inputted by the uses…
Aug 28, 2019
35acea9
Merge branch 'branch-Level-8'
Aug 28, 2019
e8daed2
Making it more OOP
Sep 2, 2019
1c21635
Merge branch 'branch-Level-7'
Sep 2, 2019
8219d3d
A-MoreOOP
Sep 2, 2019
808d2dd
A-JUnit
Sep 2, 2019
e5b08a3
Level-9 (Now Able to Find Tasks!)
Sep 3, 2019
e56bf4d
A-JavaDoc (Added Java Doc for every class & every method)
Sep 3, 2019
dfe5277
A-CodingStandard (Changed the Access Modifier of some class variables…
Sep 3, 2019
16f1bda
Merge branch 'branch-A-CodingStandard' into master
Sep 3, 2019
5304e70
Merge branch 'branch-Level-9' into master
Sep 3, 2019
d9893cc
Merge branch 'gradle'
Sep 3, 2019
d708610
Fixed a bug (there was a merge conflict so it wasn't compiling)
Sep 3, 2019
0f9f7bd
Created my first GUI application! (a window that says Hello World)
Sep 4, 2019
2e58d6b
Created the GUI for Duke (but without any functionality)
Sep 4, 2019
59acd1a
Iteration 1 – Echoing the User
Sep 4, 2019
5131533
Iteration 2 – Adding Dialog Boxes
Sep 4, 2019
85bffc6
Duke GUI now responds to user input!
Sep 4, 2019
07298f9
Making JUnit work with Gradle (and adding more unit testing functions)
Sep 30, 2019
8f60f0f
Made the DialogBox have resizable width (through SceneBuilder) so tha…
Sep 30, 2019
acb5af9
Merge branch 'branch-Level-10'
Sep 30, 2019
8a19a8b
Added assert feature to document important assumptions that should ho…
Sep 30, 2019
e461b9a
Critically examined the code and refactored it to improve the code qu…
Sep 30, 2019
8d53e2c
Merge pull request #5 from eizon05/branch-A-CodeQuality
aang114 Sep 30, 2019
af61ae9
Merge branch 'master' into branch-A-Assertions
aang114 Sep 30, 2019
b54fc5f
Merge pull request #6 from eizon05/branch-A-Assertions
aang114 Sep 30, 2019
015f926
Add Ui.png
aang114 Sep 30, 2019
022e6c7
Update README.md
aang114 Sep 30, 2019
1360dee
Update README.md
aang114 Sep 30, 2019
540fb54
Update README.md
aang114 Sep 30, 2019
a966f0a
Update README.md
aang114 Sep 30, 2019
63aebb5
Update README.md
aang114 Sep 30, 2019
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ src/main/resources/docs/
.DS_Store
*.iml
bin/
src/.idea/$PRODUCT_WORKSPACE_FILE$
src/.idea/.gitignore
src/.idea/misc.xml
src/.idea/modules.xml
src/.idea/vcs.xml
src/out/production/main/Duke.class
36 changes: 36 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
plugins {
id 'java'
id 'application'

id 'org.openjfx.javafxplugin' version '0.0.7'
}

javafx {
version = "11.0.2"
modules = [ 'javafx.controls', 'javafx.fxml' ]
}

group 'seedu.duke'
version '0.1.0'

repositories {
mavenCentral()
}

dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
}

application {
// Change this to your main class.
mainClassName = "Duke"
}

run {
standardInput = System.in
}

test {
useJUnitPlatform()
}
257 changes: 257 additions & 0 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">

<!--
Checkstyle configuration that checks the Google coding conventions from Google Java Style
that can be found at https://google.github.io/styleguide/javaguide.html
Checkstyle is very configurable. Be sure to read the documentation at
http://checkstyle.sf.net (or in your downloaded distribution).
To completely disable a check, just comment it out or delete it from the file.
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
-->

<module name = "Checker">
<property name="charset" value="UTF-8"/>

<property name="severity" value="error"/>

<property name="fileExtensions" value="java, properties, xml"/>
<!-- Excludes all 'module-info.java' files -->
<!-- See https://checkstyle.org/config_filefilters.html -->
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>

<module name="TreeWalker">
<module name="OuterTypeFilename"/>
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
<property name="format"
value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
<property name="message"
value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
</module>
<module name="AvoidEscapedUnicodeCharacters">
<property name="allowEscapesForControlCharacters" value="true"/>
<property name="allowByTailComment" value="true"/>
<property name="allowNonPrintableEscapes" value="true"/>
</module>
<module name="LineLength">
<property name="max" value="120"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>
<module name="AvoidStarImport"/>
<module name="OneTopLevelClass"/>
<module name="NoLineWrap"/>
<module name="EmptyBlock">
<property name="option" value="TEXT"/>
<property name="tokens"
value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
</module>
<module name="NeedBraces"/>
<module name="LeftCurly"/>
<module name="RightCurly">
<property name="id" value="RightCurlySame"/>
<property name="tokens"
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,
LITERAL_DO"/>
</module>
<module name="RightCurly">
<property name="id" value="RightCurlyAlone"/>
<property name="option" value="alone"/>
<property name="tokens"
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,
INSTANCE_INIT"/>
</module>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyLambdas" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
<property name="allowEmptyLoops" value="true"/>
<message key="ws.notFollowed"
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
<message key="ws.notPreceded"
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
</module>
<module name="OneStatementPerLine"/>
<module name="MultipleVariableDeclarations"/>
<module name="ArrayTypeStyle"/>
<module name="MissingSwitchDefault"/>
<module name="FallThrough"/>
<module name="UpperEll"/>
<module name="ModifierOrder"/>
<module name="EmptyLineSeparator">
<property name="allowNoEmptyLineBetweenFields" value="true"/>
</module>
<module name="SeparatorWrap">
<property name="id" value="SeparatorWrapDot"/>
<property name="tokens" value="DOT"/>
<property name="option" value="nl"/>
</module>
<module name="SeparatorWrap">
<property name="id" value="SeparatorWrapComma"/>
<property name="tokens" value="COMMA"/>
<property name="option" value="EOL"/>
</module>
<module name="SeparatorWrap">
<!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/258 -->
<property name="id" value="SeparatorWrapEllipsis"/>
<property name="tokens" value="ELLIPSIS"/>
<property name="option" value="EOL"/>
</module>
<module name="SeparatorWrap">
<!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/259 -->
<property name="id" value="SeparatorWrapArrayDeclarator"/>
<property name="tokens" value="ARRAY_DECLARATOR"/>
<property name="option" value="EOL"/>
</module>
<module name="SeparatorWrap">
<property name="id" value="SeparatorWrapMethodRef"/>
<property name="tokens" value="METHOD_REF"/>
<property name="option" value="nl"/>
</module>
<module name="PackageName">
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
<message key="name.invalidPattern"
value="Package name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="TypeName">
<message key="name.invalidPattern"
value="Type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MemberName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
<message key="name.invalidPattern"
value="Member name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ParameterName">
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<message key="name.invalidPattern"
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="LambdaParameterName">
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<message key="name.invalidPattern"
value="Lambda parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="CatchParameterName">
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<message key="name.invalidPattern"
value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="LocalVariableName">
<property name="tokens" value="VARIABLE_DEF"/>
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<message key="name.invalidPattern"
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ClassTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Class type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MethodTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Method type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="InterfaceTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Interface type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="NoFinalizer"/>
<module name="GenericWhitespace">
<message key="ws.followed"
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
<message key="ws.preceded"
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
<message key="ws.illegalFollow"
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
<message key="ws.notPreceded"
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
</module>
<module name="Indentation">
<property name="basicOffset" value="4"/>
<property name="braceAdjustment" value="0"/>
<property name="caseIndent" value="0"/>
<property name="throwsIndent" value="4"/>
<property name="lineWrappingIndentation" value="4"/>
<property name="arrayInitIndent" value="4"/>
</module>
<module name="AbbreviationAsWordInName">
<property name="ignoreFinal" value="false"/>
<property name="allowedAbbreviationLength" value="1"/>
</module>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="VariableDeclarationUsageDistance"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceBefore">
<property name="tokens"
value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
<property name="allowLineBreaks" value="true"/>
</module>
<module name="ParenPad"/>
<module name="OperatorWrap">
<property name="option" value="NL"/>
<property name="tokens"
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,
LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>
</module>
<module name="AnnotationLocation">
<property name="id" value="AnnotationLocationMostCases"/>
<property name="tokens"
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
</module>
<module name="AnnotationLocation">
<property name="id" value="AnnotationLocationVariables"/>
<property name="tokens" value="VARIABLE_DEF"/>
<property name="allowSamelineMultipleAnnotations" value="true"/>
</module>
<module name="NonEmptyAtclauseDescription"/>
<module name="JavadocTagContinuationIndentation"/>
<module name="SummaryJavadoc">
<property name="forbiddenSummaryFragments"
value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
</module>
<module name="JavadocParagraph"/>
<module name="AtclauseOrder">
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
<property name="target"
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="allowThrowsTagsForSubclasses" value="true"/>
</module>
<module name="MissingJavadocMethod">
<property name="scope" value="public"/>
<property name="minLineCount" value="2"/>
<property name="allowedAnnotations" value="Override, Test"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
<message key="name.invalidPattern"
value="Method name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="SingleLineJavadoc">
<property name="ignoreInlineTags" value="false"/>
</module>
<module name="EmptyCatchBlock">
<property name="exceptionVariableName" value="expected"/>
</module>
<module name="CommentsIndentation"/>
</module>
</module>
81 changes: 72 additions & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,83 @@
# User Guide

## 1. Introduction

Duke is a GUI (Graphical User Interface) application that lets you set reminders for tasks. The user interacts with the application through the Command Line Interface (CLI).

## 2. Quick Start

1. Ensure that you have Java 11 or above installed in your Computer.

2. Download the latest duke.jar [here](https://github.com/eizon05/duke/releases).

3. Copy the file to the folder you want to use as the home folder for your Duke.

4. Double-click the file to start the app. The GUI should appear in a few seconds.

## Features

### Feature 1
Description of feature.
### 3.1 Adding a Task

Adds (and saves) a task to Duke. There are 3 kinds of tasks:

#### 3.1.1 Todo

Format: "todo {description}"

#### 3.1.2 Deadline

Format: "deadline {description} /by {date}"

Note: Slash used must be a forward slash

#### 3.1.3 Event

Format: "event {description} /at {date)"

Note: Slash used must be a forward slash

### 3.2 Listing all Tasks

Format: "list"

Lists all the tasks that are saved in Duke (in order of time saved)

### 3.3 Deleting a Task

Format: "delete {index}"

Deletes a task from the list which is at the index, "{index}"

### 3.4 Marking a Task as Done

Format: "done {index}"

Marks the task at the index, "{index}", (in the list) as done

### 3.5 Finding a Task that contains a specific string

Format: "find {string}"

Shows the tasks that contains a specific string

### 3.6 Archiving a Task

Format: "archive {index}"

Archives the task at the index, "{index}", of the list.

## Usage
Note: All archived tasks can be seen in 'data/archive.txt'

### `Keyword` - Describe action

Describe action and its outcome.
### 3.7 Bye

Example of usage:
Format: "bye"

`keyword (optional arguments)`
Terminates the application

Expected outcome:
## Additional Information

`outcome`
1. Duke saves the entire list of tasks whenever you add, delete or mark a task as done.
2. When typing commands with index numbers, please make sure to type the index number that correlates to the number in the list of tasks
3. Whenever a task is archived, it will be removed from the list of tasks
4. Archived tasks can be accessed from the data folder which is located in the same directory as 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.
Loading