Skip to content

Commit

Permalink
Merge pull request #170 from MeLoveCarbs/DevGuideUpdate
Browse files Browse the repository at this point in the history
Dev guide update
  • Loading branch information
MeLoveCarbs authored Apr 11, 2020
2 parents cccc455 + d3aa65e commit 6c6545b
Show file tree
Hide file tree
Showing 10 changed files with 135 additions and 44 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ test {
}

application {
mainClassName = "MeetingOrganizer"
mainClassName = "WhenFree"
}

shadowJar {
archiveBaseName = "MeetingOrganizer"
archiveVersion = "2.0"
archiveBaseName = "WhenFree"
archiveVersion = "2.1"
archiveClassifier = null
archiveAppendix = null
}
Expand Down
36 changes: 19 additions & 17 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ By: `AY1920S2-CS2113T-T12-1`
* [3.6. Delete a scheduled meeting](#36-delete-a-scheduled-meeting)
* [3.7. Delete a contact](#37-delete-a-contact)
* [3.8. List all scheduled meetings](#38-list-all-scheduled-meetings)
* [4. Documentation](#4-documentation)
* [5. Testing](#5-testing)
* [6. Dev Ops](#6-dev-ops)
* [Appendix A: Product Scope](#appendix-a-product-scope)
* [A.1. Target user profile](#a1-target-user-profile)
* [A.2. Value proposition](#a2-value-proposition)
Expand All @@ -46,7 +43,7 @@ Prerequisites<br>
Setting up the project<br>
1. Fork this repository and ```git clone``` it onto your computer.
2. Open Intellij and import the ```build.gradle``` from project directory of the cloned repository.
> :information_source If this your first time opening Intellij, you will be greeted with a welcome screen. Open ```Gradle``` from the vertical right tabs and type ```gradle run``` to build the project.th a welcome screen. Click ```import project``` > ```build.gradle``` to open up the project.
> :information_source: If this your first time opening Intellij, you will be greeted with a welcome screen. Open ```Gradle``` from the vertical right tabs and type ```gradle run``` to build the project.th a welcome screen. Click ```import project``` > ```build.gradle``` to open up the project.
3. Set up the correct JDK version for Gradle:
* Click the ```File``` tab > ```Project Structure``` > ```Platform Settings``` > ```SDK```.
* Select the path where your JDK(>11) is installed. Click this link if you do not have at least JDK11.
Expand All @@ -60,7 +57,7 @@ Verifying Setup
### 2.1. Architecture
![Architecture Diagram](images/architecture.png)<br>

The architecture diagram above shows an overview of the high-level design of MeetingOrganizer. Meeting Organizer
The architecture diagram above shows an overview of the high-level design of WhenFree. Meeting Organizer
adopts an n-tier style architecture where higher layers make use of the services provided by the lower layers.
Here is a quick overview of each layer and the components residing in it.
* UI: The CLI user interface of the application.
Expand Down Expand Up @@ -146,7 +143,7 @@ The ```contacts``` component of our application consists of 2 classes: ```TeamMe

![storage component class structure](images/storage_class_diagram.png)

Above image shows the structure of Storage. It is created by MeetingOrganizer class to handle the loading and saving of scheduled meetings and member schedules.
Above image shows the structure of Storage. It is created by WhenFree class to handle the loading and saving of scheduled meetings and member schedules.

The `Storage` component,
- can save `Contact` objects in .txt format and read it back.
Expand Down Expand Up @@ -369,7 +366,7 @@ Given below is an example usage scenario and how the ```ListMeetings``` command

## Appendix A: Product Scope
### A.1. Target user profile
Our application, MeetingOrganizer, is for NUS students and teaching assistants looking to save time finding
Our application, WhenFree, is for NUS students and teaching assistants looking to save time finding
free-slots for their project meetings, consultations etc. It allow users to add their team members and tutees respectively, and
finding a time-slot where everyone would be free.
Target user profile:
Expand Down Expand Up @@ -439,25 +436,24 @@ Given below are instructions to test the app manually.
**Expected: Application should shut down with an exit message, intermediate contacts and meetings would be saved.**


> :information_source: The test cases below are provided such that it should be executable without showing any errors if follow sequentially.
> :information_source: The test cases below are provided such that it should be executable without showing any errors if followed sequentially from F.2 onwards.
### F.2. Setting up profile
1. Set up your contacts profile
1. Test case: Tommy https://nusmods.com/timetable/sem-2/share?CFG1002=LEC:06&CG2023=PLEC:02,LAB:03,PTUT:02&CG2027=LEC:01,TUT:01&CG2028=LAB:02,TUT:01,LEC:01&CS2101=&CS2113T=LEC:C01&GES1020=TUT:2,LEC:1&SPH2101=LEC:1,TUT:6

1.Test case: ```Tommy https://nusmods.com/timetable/sem-2/share?CFG1002=LEC:06&CG2023=PLEC:02,LAB:03,PTUT:02&CG2027=LEC:01,TUT:01&CG2028=LAB:02,TUT:01,LEC:01&CS2101=&CS2113T=LEC:C01&GES1020=TUT:2,LEC:1&SPH2101=LEC:1,TUT:6``` <br>
**Expected: A new main contact will be added. Name: Tommy, with his respective modules.**

> :information_source: Note that the first user added to the contact will be the main user of the application. Meeting schedule will be stored into main user's timetable.
2. Test case: Patricia https://nusmods.com/timetable/sem-2/share?CG2023=PLEC:03,PTUT:03,LAB:06&CG2027=LEC:01,TUT:01&CG2028=LAB:01,TUT:01,LEC:01&CS2101=&CS2113T=LEC:C01&LAT1201=LEC:1
Agnus https://nusmods.com/timetable/sem-2/share?CG2023=LAB:03,PLEC:03,PTUT:03&CG2027=LEC:01,TUT:01&CG2028=LAB:02,TUT:01,LEC:01&CS2101=&CS2107=TUT:09,LEC:1&CS2113T=LEC:C01
Jerry https://nusmods.com/timetable/sem-2/share?CG2023=LAB:04,PLEC:02,PTUT:01&CS3235=TUT:3,LEC:1

2. Test case: ```Patricia https://nusmods.com/timetable/sem-2/share?CG2023=PLEC:03,PTUT:03,LAB:06&CG2027=LEC:01,TUT:01&CG2028=LAB:01,TUT:01,LEC:01&CS2101=&CS2113T=LEC:C01&LAT1201=LEC:1``` <br>
```Agnus https://nusmods.com/timetable/sem-2/share?CG2023=LAB:03,PLEC:03,PTUT:03&CG2027=LEC:01,TUT:01&CG2028=LAB:02,TUT:01,LEC:01&CS2101=&CS2107=TUT:09,LEC:1&CS2113T=LEC:C01``` <br>
```Jerry https://nusmods.com/timetable/sem-2/share?CG2023=LAB:04,PLEC:02,PTUT:01&CS3235=TUT:3,LEC:1``` <br>
**Expected: 3 new contacts will be added, with their respective modules.**


### F.3. Scheduling a meeting
1. Setting up a meeting among all contacts.
1. Type ```timetable 0 1 2 3``` to show the combined timetable of all members.
1. Prerequisites: Type ```timetable 0 1 2 3``` to show the combined timetable of all members.
2. Check to see if there are any empty slots. Slots marked with ```X``` means the slot is taken up.
3. Scheduling of meeting is allowed as long as ```X``` is not marked in the main user's timetable.
4. Test case: ```schedule test_meeting startDate startTime endDate endTime```
Expand All @@ -466,6 +462,12 @@ Given below are instructions to test the app manually.
### F.4. Deleting a meeting
1. Deleting a scheduled meeting.
1. Type ```meetings``` to list down all meetings in the main user's timetable.
2. Test case:
1. Prerequisites: Type ```meetings``` to list down all meetings in the main user's timetable.
2. Test case: ```delete 1```. <br>
**Expected: The meeting scheduled previously in F.3 is deleted.**

### F.5. Editing a particular timetable
1. Editing main user's timetable
1. You

### F.2. Saving data
Binary file modified docs/images/AddContact.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 modified docs/images/ListContact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
/**
* Main application containing an instance of LogicManager and storage component.
*/
public class MeetingOrganizer {
public class WhenFree {
public static final int RECESS_WEEK = 14;
public static final int FREE_WEEK = 15;
public static Storage storage;
private LogicManager myLogicManager;
private int currentWeekNumber;

public MeetingOrganizer() {
public WhenFree() {
MeetingList myMeetingList;
ContactList myContactList;
Contact mainUser = null;
Expand Down Expand Up @@ -60,7 +60,7 @@ public MeetingOrganizer() {
}

public static void main(String[] args) {
new MeetingOrganizer().run();
new WhenFree().run();
}

void botResponse(String[] userInputWords, String prevUserInputWord, String[] prevUserInputWords)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/common/BlacklistedModules.java
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public class BlacklistedModules {
"TIE4259",
"TSC3222"
};
public static final Set<String> blacklistModule = Set.of(arr);
public static final HashSet<String> blacklistModule = new HashSet<>(Arrays.asList(arr));

/**
* Run this to retrieve all the modules that doesn't follow the conventional format and
Expand Down
28 changes: 15 additions & 13 deletions src/main/java/common/LessonType.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
package common;

import java.util.Map;
import java.util.HashMap;

/**
* Maps the lessonType full name into its coded form to used by NUSMODS link.
* Referenced from https://github.com/raynoldng/nusmods-planner/blob/master/nusmodsplanner/definitions.py
*/
public class LessonType {
public static final Map<String, String> lessonType = Map.ofEntries(
Map.entry("Packaged Lecture", "PLEC"),
Map.entry("Packaged Tutorial", "PTUT"),
Map.entry("Design Lecture", "DLEC"),
Map.entry("Laboratory", "LAB"),
Map.entry("Lecture", "LEC"),
Map.entry("Recitation", "REC"),
Map.entry("Sectional Teaching", "SEC"),
Map.entry("Seminar-style Module Class", "SEM"),
Map.entry("Tutorial", "TUT"),
Map.entry("Tutorial Type 2", "TUT2")
);
public static final HashMap<String, String> lessonType = new HashMap<>();

static {
lessonType.put("Packaged Lecture", "PLEC");
lessonType.put("Packaged Tutorial", "PTUT");
lessonType.put("Design Lecture", "DLEC");
lessonType.put("Laboratory", "LAB");
lessonType.put("Lecture", "LEC");
lessonType.put("Recitation", "REC");
lessonType.put("Sectional Teaching", "SEC");
lessonType.put("Seminar-style Module Class", "SEM");
lessonType.put("Tutorial", "TUT");
lessonType.put("Tutorial Type 2", "TUT2");
}
}
56 changes: 50 additions & 6 deletions text-ui-test/ACTUAL.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ________________________________________________________________________________

Insert your member's timetable by following: <name of new member> <nusmods link>
________________________________________________________________________________________________________________________________
Today is Fri Apr 10, week 12.
Today is Sat Apr 11, week 12.
Your timetable this week:

Date: 5th 6th 7th 8th 9th 10th 11th
Expand Down Expand Up @@ -106,7 +106,7 @@ ________________________________________________________________________________

Insert your member's timetable by following: <name of new member> <nusmods link>
________________________________________________________________________________________________________________________________
Today is Fri Apr 10, week 12.
Today is Sat Apr 11, week 12.
Your timetable this week:

Date: 5th 6th 7th 8th 9th 10th 11th 12th 13th 14th 15th 16th 17th 18th
Expand Down Expand Up @@ -159,7 +159,7 @@ ________________________________________________________________________________

Insert your member's timetable by following: <name of new member> <nusmods link>
________________________________________________________________________________________________________________________________
Today is Fri Apr 10, week 12.
Today is Sat Apr 11, week 12.
Timetable of the selected team member/s this week:

Date: 5th 6th 7th 8th 9th 10th 11th
Expand Down Expand Up @@ -221,7 +221,7 @@ ________________________________________________________________________________

Insert your member's timetable by following: <name of new member> <nusmods link>
________________________________________________________________________________________________________________________________
Today is Fri Apr 10, week 12.
Today is Sat Apr 11, week 12.
Timetable of the selected team member/s this week:

Date: 5th 6th 7th 8th 9th 10th 11th 12th 13th 14th 15th 16th 17th 18th
Expand Down Expand Up @@ -282,7 +282,7 @@ ________________________________________________________________________________

Insert your member's timetable by following: <name of new member> <nusmods link>
________________________________________________________________________________________________________________________________
Today is Fri Apr 10, week 12.
Today is Sat Apr 11, week 12.
Timetable of the selected team member/s this week:

Date: 5th 6th 7th 8th 9th 10th 11th
Expand Down Expand Up @@ -344,7 +344,7 @@ ________________________________________________________________________________

Insert your member's timetable by following: <name of new member> <nusmods link>
________________________________________________________________________________________________________________________________
Today is Fri Apr 10, week 12.
Today is Sat Apr 11, week 12.
Timetable of the selected team member/s this week:

Date: 5th 6th 7th 8th 9th 10th 11th 12th 13th 14th 15th 16th 17th 18th
Expand Down Expand Up @@ -497,6 +497,49 @@ ________________________________________________________________________________

Insert your member's timetable by following: <name of new member> <nusmods link>
________________________________________________________________________________________________________________________________
Today is Sat Apr 11, week 12.
Your timetable this week:

Date: 5th 6th 7th 8th 9th 10th 11th
SUN MON TUE WED THU FRI SAT
0900 +-----+-----+-----+-----+-----+-----+-----+
| | | X | | | | |
+-----+-----+-----+-----+-----+-----+-----+
| | | X | | | | |
1000 +-----+-----+-----+-----+-----+-----+-----+
| | | X | X | | | |
+-----+-----+-----+-----+-----+-----+-----+
| | | X | X | | | |
1100 +-----+-----+-----+-----+-----+-----+-----+
| | | X | | | | |
+-----+-----+-----+-----+-----+-----+-----+
| | | X | | | | |
1200 +-----+-----+-----+-----+-----+-----+-----+
| | X | X | X | X | | |
+-----+-----+-----+-----+-----+-----+-----+
| | X | X | X | X | | |
1300 +-----+-----+-----+-----+-----+-----+-----+
| | X | | X | X | | |
+-----+-----+-----+-----+-----+-----+-----+
| | X | | X | X | | |
1400 +-----+-----+-----+-----+-----+-----+-----+
| | | X | X | X | | |
+-----+-----+-----+-----+-----+-----+-----+
| | | X | X | X | | |
1500 +-----+-----+-----+-----+-----+-----+-----+
| | X | X | | X | | |
+-----+-----+-----+-----+-----+-----+-----+
| | X | X | | X | | |
1600 +-----+-----+-----+-----+-----+-----+-----+
| | X | X | | X | | |
+-----+-----+-----+-----+-----+-----+-----+
| | X | X | | X | | |
1700 +-----+-----+-----+-----+-----+-----+-----+
| | | X | | X | | |
+-----+-----+-----+-----+-----+-----+-----+
| | | X | | X | | |
1800 +-----+-----+-----+-----+-----+-----+-----+
[NOTE] You can type "more" for next week's timetable as well!
________________________________________________________________________________________________________________________________
[contacts] List all contacts.
[timetable] Display combined timetable of selected contacts.
Expand All @@ -508,3 +551,4 @@ ________________________________________________________________________________

Insert your member's timetable by following: <name of new member> <nusmods link>
________________________________________________________________________________________________________________________________
Thank you for using WhenFree, goodbye!
44 changes: 44 additions & 0 deletions text-ui-test/EXPECTED.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,49 @@ ________________________________________________________________________________

Insert your member's timetable by following: <name of new member> <nusmods link>
________________________________________________________________________________________________________________________________
Today is Sat Apr 11, week 12.
Your timetable this week:

Date: 5th 6th 7th 8th 9th 10th 11th
SUN MON TUE WED THU FRI SAT
0900 +-----+-----+-----+-----+-----+-----+-----+
| | | X | | | | |
+-----+-----+-----+-----+-----+-----+-----+
| | | X | | | | |
1000 +-----+-----+-----+-----+-----+-----+-----+
| | | X | X | | | |
+-----+-----+-----+-----+-----+-----+-----+
| | | X | X | | | |
1100 +-----+-----+-----+-----+-----+-----+-----+
| | | X | | | | |
+-----+-----+-----+-----+-----+-----+-----+
| | | X | | | | |
1200 +-----+-----+-----+-----+-----+-----+-----+
| | X | X | X | X | | |
+-----+-----+-----+-----+-----+-----+-----+
| | X | X | X | X | | |
1300 +-----+-----+-----+-----+-----+-----+-----+
| | X | | X | X | | |
+-----+-----+-----+-----+-----+-----+-----+
| | X | | X | X | | |
1400 +-----+-----+-----+-----+-----+-----+-----+
| | | X | X | X | | |
+-----+-----+-----+-----+-----+-----+-----+
| | | X | X | X | | |
1500 +-----+-----+-----+-----+-----+-----+-----+
| | X | X | | X | | |
+-----+-----+-----+-----+-----+-----+-----+
| | X | X | | X | | |
1600 +-----+-----+-----+-----+-----+-----+-----+
| | X | X | | X | | |
+-----+-----+-----+-----+-----+-----+-----+
| | X | X | | X | | |
1700 +-----+-----+-----+-----+-----+-----+-----+
| | | X | | X | | |
+-----+-----+-----+-----+-----+-----+-----+
| | | X | | X | | |
1800 +-----+-----+-----+-----+-----+-----+-----+
[NOTE] You can type "more" for next week's timetable as well!
________________________________________________________________________________________________________________________________
[contacts] List all contacts.
[timetable] Display combined timetable of selected contacts.
Expand All @@ -508,3 +551,4 @@ ________________________________________________________________________________

Insert your member's timetable by following: <name of new member> <nusmods link>
________________________________________________________________________________________________________________________________
Thank you for using WhenFree, goodbye!
1 change: 0 additions & 1 deletion text-ui-test/input.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ schedule test_meeting 15 19:00 15 22:00
schedule test_meeting2 16 19:00 16 23:30
delete 1
meetings
edit free 0 11 11:30 11 15:00
timetable
exit

0 comments on commit 6c6545b

Please sign in to comment.