-
Notifications
You must be signed in to change notification settings - Fork 248
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
[CS2113-T12-3] Student Exchange Programme Helper #22
base: master
Are you sure you want to change the base?
Changes from 250 commits
9318f2c
e6d611a
46f67b1
f0750c1
11b5e6f
307ef54
6615696
affd10e
2af669b
1218936
9f1d7a7
96656b9
20fd061
477c965
457d2b6
168c842
2bedfc5
163da16
bb60332
62cb629
0f5e9e0
c5b91c5
147735d
8b76761
ad6657e
a1c7b31
80f909d
7b58562
5a90a1d
18affd0
bf5761c
d0713aa
00401a0
f00e13d
28248b3
f8fd6a9
407d32f
59c4473
29d62b0
e5ac487
c23377a
0ffc267
a3e0daf
6ccd6f8
e097df8
a89be9d
e1706f6
e7c79b1
aa26218
fb61f25
3f099df
b3e9187
a32831d
b989b98
7f71aa6
e59cdca
2699705
c196bba
f1b6602
0de9d68
15a1b7a
a3ee8f9
b82c56d
aaeddea
f783a8e
3106afa
cbd2b13
30cb402
7bde58b
f6e89b1
52e98f4
7e2f93f
73db092
33f64c4
afa61fe
485098b
d6a9003
6cebb84
77af144
4cbb047
ae650af
67eb045
7e5cae7
b6d31b5
1c0228e
1d1bfc4
dca92a2
6a5b23c
6e0294f
3b658fa
c28d8cc
c135858
8ee3c04
41e6fa3
f4283c6
2fb3801
7d8f031
0b61cbd
144f21a
916af54
6f0fd65
cf798d0
3e552ed
ca3b776
bb90e29
b37e6ae
91b255a
136895b
f4b22fb
85fcf78
87c2dba
6dfeddc
752e9a3
6dffd76
93db584
9413c8f
414ae1c
b1fe589
980bc35
d91a27c
a0e0986
aa27a69
2c8ecf4
2c041b3
42149d9
e2d8331
aaf7668
79e2d59
ac5c6e4
8c6d2fb
c2e9d5a
3fcc29a
a2073fd
c84f66f
c84b27b
5a2c3f0
9182ffe
f49e306
e4255ee
82657ce
302056b
347c587
3df6156
cf7d31a
5ba6ede
4decc20
3054bb4
4641052
cc562ff
390b78c
1aaded9
25caa1c
c6e5d40
3664a05
6a734b9
78ed2d4
512f2cf
875587e
03b5c88
d8c2ae2
2699286
8185618
6477438
e1a330b
5258169
dc3750c
40b4319
e59dc60
c3ca182
ea4f0b3
ff05e8f
9cc4af1
1b2f700
70f635a
8823f4a
edb4625
56b9389
8e9fb3f
b03efde
686d8a5
7bd36ef
c4a116d
29d6188
ce46003
ef7dbad
a4bc4b8
6e73ac2
30ac4c3
c46a10b
81243a8
ed78d52
0aab465
28c0b29
3dc6d10
de4d796
3a42374
b8ef4e2
57647ce
d8f0402
bc817b6
26ad144
b3aeccd
8b9233c
b707364
937c538
536fef9
6332b49
6a01530
f1377a9
21fdce5
0f1f3bc
1312101
db0b39c
01a2c30
2138915
1a53e3f
d992485
8d28c75
e228068
8b720ef
c4912b6
8602f6c
d3e6217
a45026b
249c30d
789451b
d36bf98
ab21883
d4190be
6a2e044
eacae8d
0972fed
ea768ce
a181c51
6904d3e
18e01b6
34e80f2
1e63acc
b286f5b
1113acd
0974893
e31c97c
5ed231f
05dcb54
025f222
67985de
2335648
400e17f
9b2de8e
f8487bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Main-Class: seedu.duke.Duke | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,5 @@ checkstyle { | |
|
||
run{ | ||
standardInput = System.in | ||
enableAssertions = true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# About us | ||
|
||
Display | Name | Github Profile | Portfolio | ||
--------|:----:|:--------------:|:---------: | ||
![](https://via.placeholder.com/100.png?text=Photo) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
Display | Name | Github Profile | Portfolio | ||
--------|:-----------------------:|:--------------------------------------:|:---------: | ||
![](https://via.placeholder.com/100.png?text=Photo) | Tan Jin Sheng Brian | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Lim Sheng Xiang, Darren | [Github](https://github.com/darrenlsx) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Sze Wen | [Github](https://github.com/SSzeWen) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | max chew | [Github](https://github.com/MuxPotato) | [Portfolio](docs/teams/muxpotato.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Seungyun Baek | [Github](https://github.com/L0Z1K) | [Portfolio](docs/team/seungyunbaek.md) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,247 @@ | ||
# Developer Guide | ||
|
||
SEP Helper is a desktop application for Mechanical Engineering students, studying at the | ||
National University of Singapore (NUS), intending to go to Korea for a Student Exchange Programme (SEP). | ||
--- | ||
|
||
## Table of Contents | ||
|
||
1. [Acknowledgements](#acknowledgements) | ||
2. [Design & Implementation](#design--implementation) | ||
1. [Architecture](#architecture) | ||
2. [Help Command](#help-command) | ||
3. [Delete Command](#delete-command) | ||
3. [Product Scope](#product-scope) | ||
1. [Target User Profile](#target-user-profile) | ||
2. [Value Proposition](#value-proposition) | ||
4. [User Stories](#user-stories) | ||
5. [Non-Functional Requirements](#non-functional-requirements) | ||
6. [Glossary](#glossary) | ||
7. [Instructions for Manual Testing](#instructions-for-manual-testing) | ||
|
||
--- | ||
|
||
## Acknowledgements | ||
|
||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} | ||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the | ||
original source as well} | ||
|
||
## Design & implementation | ||
|
||
# Architecture | ||
|
||
![Architecture.png](diagrams%2FArchitecture.png) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Architecture is clear and easy to understand. |
||
The above _**Architecture**_ diagram gives a high-level overall of the program. | ||
|
||
**Main Components of system** | ||
|
||
1. Duke : Taking user inputs | ||
2. Parser : Processes and Executes User Commands | ||
3. UI : Prints out messages to user | ||
4. Storage : Processes and stores | ||
5. DataReader | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a missing whitespace here? (Diagram says "Data Reader") |
||
|
||
**1. Duke** | ||
|
||
Duke holds an instance of each of the component mentioned above. | ||
It is the starting point of our program and takes in user inputs. | ||
Duke executes commands based on an object of class "Command" after Parser processes user inputs and | ||
returns a Command object back to Duke. | ||
|
||
**2. Parser** | ||
|
||
Parser class serves to process raw user input and map it to one of the various commands. | ||
Parser class will return an object of class "Command", which will be used by Duke to execute the user's commands. | ||
|
||
**3. UI** | ||
|
||
UI class is in charge of the majority of the print functions present in the program. | ||
It is instantiated once in both Parser and Duke classes, where it's print functions are utilized | ||
to print outputs to the User. | ||
|
||
Future Improvements: UI to handle ALL of the printing functions present in the program. | ||
|
||
**4. Storage** | ||
|
||
Storage class holds an ArrayList of modules that the user has selected. | ||
It saves the user's modules to an external .txt file every time the module list is altered, | ||
and reads from the same .txt file when the program is first booted up. | ||
|
||
**5. DataReader** | ||
|
||
DataReader class reads two external .txt files to acquire the list of Partner Universities and list | ||
of Modules available in the PUs, and provides this information to other components. | ||
|
||
{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the uml diagram is missing |
||
|
||
### Storage | ||
|
||
The Storage class handles the loading and storing of information into a single text file in the User's computer. | ||
During the initialisation of the Storage class, which is at the start of the program, loading of data occurs. | ||
From here on, querying of the Storage class is allowed, where modules saved by the user can be accessed through | ||
the ListCurrentCommand. There are only two commands that will cause changes to the text file. They are the AddCommand | ||
and DeleteCommand. This involves adding of new modules and deleting of old modules to the Storage. The text file will | ||
be continuously updated every time an Add or Delete command is called. | ||
|
||
How module data is stored in text file: | ||
|
||
Module information is stored in one single line separated by commas | ||
`univID`,`moduleCode`,`moduleName`,`moduleMCs`,`nusModuleCode`,`nusModuleName`,`nusModuleMcs` | ||
|
||
Sequence Diagram of Storage initialisation: | ||
|
||
![Storage.png](diagrams%2FStorage%2FStorage.png) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sequence diagram looks blur, but it seems like the return values are not indicated with a dotted line. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be better to add figure numbers to your diagrams too! |
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Image looks blur on the website There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agree |
||
The Storage class also handles the adding of new modules and the deleting of past modules. When any of this occurs, the | ||
txt file will be updated immediately after the successful adding/deletion of saved modules in the Storage. | ||
|
||
- For adding of newly saved modules, they are added through appending to the saved_modules.txt file | ||
- For deleting of past saved modules, they are deleted, and the txt file is updated by rewriting every module from the | ||
ArrayList of saved modules | ||
|
||
### Parser | ||
|
||
The parser class is responsible for parsing the user's input commands and returning the appropriate command object. | ||
The commands that the parser class will initialise are ListPuCommand(), ListCurrentCommand(modules), | ||
prepareListPuModulesCommand(userCommandSecondKeyword, universities), ExitCommand(), | ||
prepareAddModuleCommand(storage, userCommandSecondKeyword, puModules, universities), | ||
DeleteModuleCommand(storage, indexToRemove, modules), and HelpCommand(). The parser class will handle error checking by | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps you can consider reformatting this to make it easier to read, as all the commands are lumped together and messy. |
||
throwing InvalidCommandException if the user's input command does not match the specified format. | ||
|
||
The following class diagrams illustrates the relationship between the Parser class and the Command classes. | ||
- (TODO: finish up the rest of the command cases) | ||
![ParserSequenceDiagram.png](diagrams%2FParserSequenceDiagram.png) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The third alt case does not state the condition explicitly, which makes it unclear on when this is called. |
||
|
||
### Help Command | ||
|
||
The help command provides a list of commands and the commands' respective input format for the user. | ||
> Syntax: /help | ||
|
||
The following sequence diagram shows the relationship between the classes involved when the delete command is called. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a typo here regarding the delete command |
||
|
||
![HelpCommandSequenceDiagram.png](diagrams%2FHelpCommandSequenceDiagram.png) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The method call printHelpCommandMessage() from :HelpModuleCommand should be at the start of the activation bar. |
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Activation bar of :HelpCommandModule appears to be cut off from the top and bottom |
||
### Delete Command | ||
|
||
The delete command removes a module from the user's saved list of modules that is specified by the user. | ||
> Syntax: delete [_uniAbbreviation_]/[_index_] | ||
|
||
The following sequence diagram shows the relationship between the classes involved when the delete command is called. | ||
|
||
![DeleteModuleCommandSequenceDiagram.png](diagrams%2FDeleteModuleCommandSequenceDiagram.png) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For return values, I think it is sufficient to write "true" instead of "return true", as it should already be clear it is a return value by the dotted arrow. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
### List Current Command | ||
|
||
Lists out all of current modules that user has added. | ||
|
||
|
||
> Syntax: list current | ||
|
||
Sequence Diagram of List Current Command. | ||
|
||
![ListCurrentCommandSequenceDiagram.png](diagrams%2FListCurrentCommandSequenceDiagram.png) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason why the dotted arrow at the end of ui:UI goes leftwards instead of right like other arrows? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice! It would be better if the self-invoked method had an return arrow on the same side of the activation bar going back into the bar. |
||
|
||
**Explanation** | ||
|
||
1. ListCurrentCommand calls printCurrentPuModList() of UI class, passing an ArrayList<Module> modules. | ||
2. UI object calls ListCurrentPu Command for all universities stored in the class-level object _universities_. | ||
3. UI prints out to userConsole the modules user has added to his list in order of the Partner Universities. | ||
|
||
See ListCurrentPuCommand for further explanation: | ||
[ListCurrentPuCommand](#list-current-pu-command) | ||
|
||
|
||
### List Pu Command | ||
|
||
Lists out all of Partner Universities. | ||
|
||
> Syntax: list pu | ||
|
||
Sequence Diagram of List Pu Command. | ||
|
||
|
||
![ListPuCommandSequenceDiagram.png](diagrams%2FListPuCommandSequenceDiagram.png) | ||
|
||
**Explanation** | ||
|
||
1. ListPuCommand calls printPUListMessage() of UI class, which simply prints out a string of message to user | ||
2. ListPuCommand calls printPUList() of UI class. | ||
3. UI class holds an instance of all the possible PUs in an Arraylist<University> object. | ||
4. UI class loops through ArrayList<University> to receive the various university information and print out | ||
to UserConsole | ||
|
||
### List Pu Modules Command | ||
|
||
Prints out list of modules available at a given Partner University | ||
|
||
> Syntax: list [_uniAbbreviation_] | ||
|
||
**Note: Partner Universities Abbreviations can be found using List Pu command** | ||
|
||
Sequence Diagram of List Pu Modules Command. | ||
![ListPuModulesCommandSequenceDiagram.png](diagrams%2FListPuModulesCommandSequenceDiagram.png) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice diagram! But the final return from the static UI class should be at the end of the activation bar There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like your UML diagram is a bit big and filled with a lot of words. Maybe you could try to make it more concise by making it small and precise. |
||
|
||
**Explanation** | ||
|
||
1. ListPuModulesCommand calls printPUModListMessage() of UI class, which prints out PU Name in a message. | ||
2. ListPuModulesCommand calls printPUModules of UI class, passing the UI class an integer called univID which | ||
UI class uses to identify which Partner University to process. | ||
3. UI class use uniID to loop through the list of modules available, and adds modules of the selected university | ||
to an ArrayList<Module> puModulesToPrint. | ||
4. UI class loops through the modules in puModulesToPrint ArrayList<Module>, retrieving module information and | ||
printing it out to userConsole | ||
|
||
### Add Module Command | ||
|
||
Adds the Module the user has wants to save to the saved modules database. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this line correct? I am still able to understand but seems like there is some typo. |
||
|
||
> Syntax: list [_uniAbbreviation/moduleCode_] | ||
|
||
Sequence Diagram of Add Module Command. | ||
|
||
![StorageAddModule.png](diagrams%2FStorage%2FStorageAddModule.png) | ||
|
||
**Explanation** | ||
|
||
1. AddModuleCommand calls addModuleToModuleList(moduleToAdd) of Storage class. moduleToAdd refers to the Module that | ||
the user has picked to add. | ||
2. In the circumstance that the moduleToAdd is null, Storage would call the printAddModuleFailureMessage to tell the | ||
user that module adding has failed, and stop the operation of AddModuleCommand. | ||
3. Storage class would then add the module to its ArrayList of saved modules. | ||
4. Storage class would then initialise an instance of FileWriter to append the newly added module to the txt file. | ||
5. After saving successfully, AddModuleCommand would call UI to print an AddModMessage and returns to Duke | ||
**Future Development** | ||
|
||
The UI class currently holds an instance all available PUs and their modules. | ||
This can and will be further refactored into other class to adhere to Single Responsbility Principle. | ||
Possible Solution: Store the PUs and modules in DataReader and use a getter function when needed. | ||
|
||
|
||
### List Current Pu Command | ||
|
||
Prints out modules selected by user specific to a Partner University. | ||
|
||
> Syntax: list current [_uniAbbreviation_] | ||
|
||
Sequence Diagram of List Current Pu Command | ||
![ListCurrentPuCommandSequenceDiagram.png](diagrams%2FListCurrentPuCommandSequenceDiagram.png) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another small typo in the image "UserConcole" |
||
|
||
**Explanation** | ||
|
||
1. ListCurrentPuCommand object is initialized with ArrayList<Modules> modules containing all user selected modules | ||
and Integer univId which is the Partner University unique ID that user has inputted. | ||
2. ListCurrentPuCommand calls PrintCurrentPuModList() of UI Class passing these two objects as arguments. | ||
3. PrintCurrentPuModList first filters out modules of the specific Partner University using uniID from the | ||
ArrayList<Module> modules. | ||
4. PrintCurrentPuModList loops through the class level object universities to retrieve the Partner university name | ||
corresponding to the uniID. | ||
5. Loops through filtered modules retrieving module information and printing it out to User Console. | ||
|
||
|
||
|
||
## Product scope | ||
|
||
### Target user profile | ||
|
||
{Describe the target user profile} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing information?