Skip to content

Commit

Permalink
Merge pull request #93 from leowyh/master
Browse files Browse the repository at this point in the history
Updated Developer Guide
  • Loading branch information
leowyh authored Oct 17, 2019
2 parents d98b6f4 + 38c0946 commit 8394b80
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 32 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AlphaNUS

![Image_of_Ui](docs/images/UI.PNG)
![Image_of_Ui](docs/images/Ui.PNG)

* AlphaNUS is an app intended for the treasurers of NUS clubs. The user interactions will occur using the CLI.
* The purpose of the app is to categorize the deadline of the payment forms, expenses of events and history of tasks completed. This allows the treasurer to be organized and efficiently keep track of their tasks.
Expand Down
2 changes: 1 addition & 1 deletion config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
</module>
<module name="AbbreviationAsWordInName">
<property name="ignoreFinal" value="false"/>
<property name="allowedAbbreviationLength" value="1"/>
<property name="allowedAbbreviationLength" value="4"/>
</module>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="VariableDeclarationUsageDistance"/>
Expand Down
49 changes: 49 additions & 0 deletions docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,41 @@ endif::[]

By: `AY1920S1-CS2113T-F10-3` Since: `Aug 2019` Licence: `NUS`

== Setting up

=== Prerequisites

. *JDK `11`* or above
. *IntelliJ* IDE
+
[NOTE]
IntelliJ by default has Gradle and JavaFx plugins installed. +
Do not disable them. If you have disabled them, go to `File` > `Settings` > `Plugins` to re-enable them.

=== Setting up the project in your computer

. Fork this repo, and clone the fork to your computer
. Open IntelliJ (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project dialog first)
. Set up the correct JDK version for Gradle
.. Click `Configure` > `Project Defaults` > `Project Structure`
.. Click `New...` and find the directory of the JDK
. Click `Import Project`
. Locate the `build.gradle` file and select it. Click `OK`
. Click `Open as Project`
. Click `OK` to accept the default settings
. Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +
This will generate all resources required by the application and tests.

== Design

== Implementation

== Documentation

== Testing

== Dev Ops

[appendix]
== Product Scope

Expand Down Expand Up @@ -43,8 +78,22 @@ Priorities: High (must have) - `* * \*`, Medium (nice to have) - `* \*`, Low (un

|`* * *` |NUS Treasurer |add my deadlines |keep track of the payments to be submitted

|`* * *` |NUS Treasurer |add payees for payments|keep track of the payments made by each payee

|`* * *` |NUS Treasurer |delete payees who made payments|remove payees whom I do not need to track

|`* * *` |NUS Treasurer |add payments made by payees|keep track of the payments made by each payee

|`* * *` |NUS Treasurer |delete payments made by payees|remove payments which I do not need to track

|`* *` |NUS Treasurer |import files to update my payments made by a payee |do not have to manually input it myself

|`* *` |NUS Treasurer |export my payments for a project into a statement of accounts |can submit it to my supervisors

|`* *` |NUS Treasurer |set priorities for each deadline |decide which task to finish first

|`* *` |NUS Treasurer |keep track of projects that I am in-charge of |manage the payments for each project

|`* *` |NUS Treasurer |view the amount of money remaining from my budget |budget my spending better

|`* *` |NUS Treasurer |edit my forms easily |correct any mistakes i make
Expand Down
File renamed without changes
16 changes: 8 additions & 8 deletions src/main/java/Duke.java → src/main/java/AlphaNUS.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@
import java.util.HashMap;

/**
* <h1>Duke</h1>
* Duke is a program that tracks a list of tasks given by the user.
* <h1>AlphaNUS</h1>
* AlphaNUS is a program that tracks a list of tasks given by the user.
*
* @author Leow Yong Heng
*/

public class Duke {
public class AlphaNUS {
private static Ui ui;
private static TaskList tasklist;
private static Storage storage;
private static HashMap<String, Payee> managermap;

/**
* Creates a Duke instance and initialises the required attributes.
* Creates a AlphaNUS instance and initialises the required attributes.
* @param filepath Filepath to the storage.
*/
private Duke(String filepath) {
private AlphaNUS(String filepath) {
ui = new Ui();
storage = new Storage(filepath);
//ArrayList<Task> arraylist = storage.load(); <-- Giving file not found exception, to remove
Expand All @@ -32,7 +32,7 @@ private Duke(String filepath) {
}

/**
* Method to run the Duke instance and take in the inputs of the user.
* Method to run the AlphaNUS instance and take in the inputs of the user.
*/
private void run() {
ui.startMessage();
Expand All @@ -45,10 +45,10 @@ private void run() {
}

/**
* The main method of the Duke program, which instantiates a duke instance with the filepath to the storage.
* The main method of the AlphaNUS program, which instantiates a AlphaNUS instance with the filepath to the storage.
* @param args Unused.
*/
public static void main(String[] args) {
new Duke("data/duke.txt").run();
new AlphaNUS("data/AlphaNUS.txt").run();
}
}
8 changes: 4 additions & 4 deletions src/main/java/command/Parser.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package command;

import common.DukeException;
import common.AlphaNUSException;
import common.TaskList;
import payment.Payee;
import payment.PaymentManager;
Expand Down Expand Up @@ -29,7 +29,7 @@ public class Parser {
* @param ui Ui that interacts with the user.
* @param storage Storage for the Tasklist.
* @return Returns boolean variable to indicate when to stop parsing for input.
* @throws DukeException if input is not valid.
* @throws AlphaNUSException if input is not valid.
*/
public static boolean parse(String input, TaskList tasklist, Ui ui,
Storage storage, HashMap<String, Payee> managermap) {
Expand Down Expand Up @@ -91,9 +91,9 @@ public static boolean parse(String input, TaskList tasklist, Ui ui,
} else if (instr.isInvoice(input)) {
process.inVoice(input, tasklist, ui);
} else {
throw new DukeException(" ☹ OOPS!!! I'm sorry, but I don't know what that means :-(");
throw new AlphaNUSException(" ☹ OOPS!!! I'm sorry, but I don't know what that means :-(");
}
} catch (DukeException e) {
} catch (AlphaNUSException e) {
ui.exceptionMessage(e.getMessage());
}
return false;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/common/AlphaNUSException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package common;

/**
* A class for exceptions specific to AlphaNUS.
*/

public class AlphaNUSException extends Exception {
/**
* Creates an instance of an exception specific to AlphaNUS.
* @param message Message describing the exception thrown.
*/
public AlphaNUSException(String message) {
super(message);
}
}
15 changes: 0 additions & 15 deletions src/main/java/common/DukeException.java

This file was deleted.

6 changes: 3 additions & 3 deletions src/main/java/ui/Ui.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ public String readInput() {
}

/**
* Prints starting message for the Duke program.
* Prints starting message for the AlphaNUS program.
*/
public void startMessage() {
String logo = line
+ " Hello! I'm Duke\n"
+ " Hello! I'm AlphaNUS\n"
+ " What can I do for you?\n"
+ line;
System.out.print(logo);
}

/**
* Prints ending message for the Duke program.
* Prints ending message for the AlphaNUS program.
*/
public void byeMessage() {
String output = line + " Bye. Hope to see you again soon!\n" + line;
Expand Down

0 comments on commit 8394b80

Please sign in to comment.