diff --git a/build.gradle b/build.gradle index 39f91bbae..a0b1f77d8 100644 --- a/build.gradle +++ b/build.gradle @@ -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 } diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 7843e86d9..28839de28 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -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) @@ -46,7 +43,7 @@ Prerequisites
Setting up the project
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. @@ -60,7 +57,7 @@ Verifying Setup ### 2.1. Architecture ![Architecture Diagram](images/architecture.png)
-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. @@ -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. @@ -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: @@ -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```
**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```
+ ```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```
**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``` @@ -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```.
+ **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 diff --git a/docs/images/AddContact.png b/docs/images/AddContact.png index 3d5877b62..e7270e8f2 100644 Binary files a/docs/images/AddContact.png and b/docs/images/AddContact.png differ diff --git a/docs/images/ListContact.png b/docs/images/ListContact.png index 6d80e7177..bf06c45e5 100644 Binary files a/docs/images/ListContact.png and b/docs/images/ListContact.png differ diff --git a/src/main/java/MeetingOrganizer.java b/src/main/java/WhenFree.java similarity index 98% rename from src/main/java/MeetingOrganizer.java rename to src/main/java/WhenFree.java index 2f35847ac..22243c1cb 100644 --- a/src/main/java/MeetingOrganizer.java +++ b/src/main/java/WhenFree.java @@ -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; @@ -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) diff --git a/src/main/java/common/BlacklistedModules.java b/src/main/java/common/BlacklistedModules.java index 6294d154b..b6cb7d527 100644 --- a/src/main/java/common/BlacklistedModules.java +++ b/src/main/java/common/BlacklistedModules.java @@ -261,7 +261,7 @@ public class BlacklistedModules { "TIE4259", "TSC3222" }; - public static final Set blacklistModule = Set.of(arr); + public static final HashSet blacklistModule = new HashSet<>(Arrays.asList(arr)); /** * Run this to retrieve all the modules that doesn't follow the conventional format and diff --git a/src/main/java/common/LessonType.java b/src/main/java/common/LessonType.java index 9509990bb..d51c0d78f 100644 --- a/src/main/java/common/LessonType.java +++ b/src/main/java/common/LessonType.java @@ -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 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 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"); + } } diff --git a/text-ui-test/ACTUAL.TXT b/text-ui-test/ACTUAL.TXT index d5cab307b..05541fed9 100644 --- a/text-ui-test/ACTUAL.TXT +++ b/text-ui-test/ACTUAL.TXT @@ -52,7 +52,7 @@ ________________________________________________________________________________ Insert your member's timetable by following: ________________________________________________________________________________________________________________________________ -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 @@ -106,7 +106,7 @@ ________________________________________________________________________________ Insert your member's timetable by following: ________________________________________________________________________________________________________________________________ -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 @@ -159,7 +159,7 @@ ________________________________________________________________________________ Insert your member's timetable by following: ________________________________________________________________________________________________________________________________ -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 @@ -221,7 +221,7 @@ ________________________________________________________________________________ Insert your member's timetable by following: ________________________________________________________________________________________________________________________________ -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 @@ -282,7 +282,7 @@ ________________________________________________________________________________ Insert your member's timetable by following: ________________________________________________________________________________________________________________________________ -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 @@ -344,7 +344,7 @@ ________________________________________________________________________________ Insert your member's timetable by following: ________________________________________________________________________________________________________________________________ -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 @@ -497,6 +497,49 @@ ________________________________________________________________________________ Insert your member's timetable by following: ________________________________________________________________________________________________________________________________ +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. @@ -508,3 +551,4 @@ ________________________________________________________________________________ Insert your member's timetable by following: ________________________________________________________________________________________________________________________________ +Thank you for using WhenFree, goodbye! diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 2e15f858e..05541fed9 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -497,6 +497,49 @@ ________________________________________________________________________________ Insert your member's timetable by following: ________________________________________________________________________________________________________________________________ +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. @@ -508,3 +551,4 @@ ________________________________________________________________________________ Insert your member's timetable by following: ________________________________________________________________________________________________________________________________ +Thank you for using WhenFree, goodbye! diff --git a/text-ui-test/input.txt b/text-ui-test/input.txt index b46b0faf3..ec2f50a61 100644 --- a/text-ui-test/input.txt +++ b/text-ui-test/input.txt @@ -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 \ No newline at end of file