Skip to content

Commit

Permalink
Merge pull request #231 from larainezo/update-DG
Browse files Browse the repository at this point in the history
Update DG and PPP
  • Loading branch information
JustWeiHao authored Apr 12, 2024
2 parents 7f032a8 + 483f350 commit 8b04b60
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 62 deletions.
6 changes: 3 additions & 3 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Hi, I am Donavon, currently a Year 2 Computer Science student. I enjoy boulderin

[[projects]()]
[[github](https://github.com/donwong2308)]
[[portfolio]()]
[[portfolio](team/donwong2308.md)]

* Role: Testing
* Responsibilities: Exception handling, Assertions
Expand All @@ -47,7 +47,7 @@ Hi, I’m Chee Xiang, a year 2 Computer Science student. I’m from a country at

[[projects]()]
[[github](http://github.com/PallonCX)]
[[portfolio]()]
[[portfolio](team/palloncx.md)]

* Role: Scheduling and tracking
* Responsibilities: Github Issue Tracker
Expand All @@ -60,7 +60,7 @@ Hi, I’m Wei Hao, a year 2 Computer Science Student. I’m from Malaysia. I pla

[[projects]()]
[[github](http://github.com/JustWeiHao)]
[[portfolio]()]
[[portfolio](team/justweihao.md)]

* Role: Deliverables and deadlines
* Responsibilities: Ensure project deliverables are done on time and in the right format
Expand Down
108 changes: 78 additions & 30 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default.md
title: "Developer Guide"
pageNav: 3
layout: default.md
title: "Developer Guide"
pageNav: 3
---

# Dormie Developer Guide
Expand Down Expand Up @@ -178,10 +178,7 @@ The implementation consists of two main classes: `Tag` and `FreeTimeTag`.
- The constructor ensures that the provided tag name meets the required format.
- Additional methods such as `isValidTagName` validate the tag name against the defined regex pattern.

#### Operations
[TBC]

### \[Proposed\] Undo/redo feature
### Add Free Time Command

#### Implementation

Expand All @@ -201,23 +198,74 @@ Step 2. The user executes `add n/Jane …​` to add a new person. The `add` com

Step 3. The user now wants to add another free time for a friend, and does so by executing the `addTime [index] ft/Wed:1000-1100` command. The `addTime` command, after successfully passing the parser, will retrieve the current FreeTimeTags HashSet. It will then append, in order of day, the new free time to the HashSet. That is, the new free time 1000-1100 on Wednesday will be appended just after timings that fall before Wednesday 1000.

Note: The user can add multiple free times at the same time by using multiple `ft/` flags in the command. An example is `addTime [index] ft/Wed:1000-1100 ft/Thu:1200-1400...`. The current code implementation will loop through the freeTime HashSet n times, with n being the number of free time tags to be added.
</box>

The following sequence diagram shows how an undo operation goes through the `Logic` component:
The following sequence diagram shows how an addFreeTime operation goes through the `Logic` component:

<puml src="diagrams/AddFreeTimeSequenceDiagram-Logic.puml" alt="AddFreeTimeSequenceDiagram-Logic" />

#### Design Considerations:

**Aspect: How add free time executes:**

* **Alternative 1 (current implementation):** Append to HashSet in order.
* Pros: Easy to visualise in GUI.
* Cons: Additional time to loop through current HashSet to append in the current position.

* **Alternative 2:** Append to end of HashSet
* Pros: Easy to implement because the new free time can just be appended at the end of the HashSet.
* Cons: Difficult to visualise in GUI (free time in Monday may appear after Tuesday's).

#### Future enhancement for this feature:
* **Merge overlapping free time intervals**
* Currently, the code appends the new time tag to the HashSet if the time tag is not already present. To improve user experience, it could be useful to merge time tags that have overlapping time intervals.

### Delete Free Time Command

#### Implementation

The delete free time mechanism is a version of the `addFreeTimeCommand`. Instead of adding free time tags to the contact's freeTimeTags HashSet, the `DeleteTimeCommand` removes tags that match the requested tag from the current freeTimeTags hashset.

Given below is an example usage scenario and how the delete free time mechanism behaves at each step.

Step 1. The user has launched the application and added a new person called Jane using the add command `add n/Jane …​`.

Step 2. Then, the user adds free time to Jane's freeTimeTags HashSet using the command `addTime [index of Jane] ft/Wed:1000-1100`.

Step 3. However, the user realises a mistake has been made and needs to remove the recently added free time. The user can do so using the command `deleteTime [index of Jane] ft/Wed:1000-1100`.

Note: The user can delete multiple free times at the same time by using multiple `ft/` flags in the command. An example is `deleteTime [index] ft/Wed:1000-1100 ft/Thu:1200-1400...`. The current code implementation will loop through the freeTime HashSet n times, with n being the number of free time tags to be deleted.
</box>

#### Design Considerations:

**Aspect: How delete free time executes:**

* **Alternative 1 (current implementation):** Delete from HashSet only if time interval exactly matches a current free time in the freeTimeTags HashSet. For example, `deleteTime [index] ft/Wed:1000-1100` will delete the `Wed:1000-1100` free time tag, but not the `Wed:1000-1200` free time tag.
* Pros: Causes fewer bugs and the main functionality is still met.
* Cons: User input will need to accurately match the free time tag to be deleted.

* **Alternative 2:** Delete from the HashSet and
* Pros: More convenient if the user wants to delete multiple free times at once. For example, `deleteTime [index] ft/Wed:1000-1200` will delete the `Wed:1000-1100` and `Wed:1100-1200` free time tags.
* Cons: Could introduce more bugs that are more challenging to resolve in a short period of time (Given the current time constraints).

#### Future enhancement for this feature:
* **Delete in-between free time intervals**
* Currently, the code deletes the new time tag from the HashSet if the time tag interval matches exactly with the input.
* To improve user experience, it could be useful to be able to delete free times that fall within an interval of a current free time tag. This will also mean that the remaining intervals will be split into 2 separate freeTimeTags.
* For example, an initial freeTimeTag could be `Mon:1000-1400`. Calling `deleteTime [index] ft/Mon:1100-1200` will result in the new freeTimeTags `Mon:1000-1100` and `Mon:1200-1400`.
#### Design considerations:

**Aspect: How add free time executes:**

* **Alternative 1 (current choice):** Append to HashSet in order.
* Pros: Easy to visualise in GUI.
* Cons: Additional time to loop through current HashSet to append in the current position.
* Pros: Easy to visualise in GUI.
* Cons: Additional time to loop through current HashSet to append in the current position.

* **Alternative 2:** Append to end of HashSet
* Pros: Easy to implement because the new free time can just be appended at the end of the HashSet.
* Cons: Difficult to visualise in GUI (free time in Monday may appear after Tuesday's).
* Pros: Easy to implement because the new free time can just be appended at the end of the HashSet.
* Cons: Difficult to visualise in GUI (free time in Monday may appear after Tuesday's).

--------------------------------------------------------------------------------------------------------------------

Expand All @@ -238,9 +286,9 @@ The following sequence diagram shows how an undo operation goes through the `Log
**Target user profile**:

* Jim is an undergraduate student enrolled in NUS College and wants to network with his batchmates who stay in the
same dorm as him.
same dorm as him.
* He likes to interact with students from other floors. Every year, the students will change rooms and new students
will come in as well.
will come in as well.
* When unsure of his work, he tends to look for his peers for help.
* Jim also enjoys celebrating milestones, especially birthdays.

Expand Down Expand Up @@ -395,15 +443,15 @@ testers are expected to do more *exploratory* testing.

1. Initial launch

1. Download the jar file and copy into an empty folder
1. Download the jar file and copy into an empty folder

1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.

1. Saving window preferences

1. Resize the window to an optimum size. Move the window to a different location. Close the window.
1. Resize the window to an optimum size. Move the window to a different location. Close the window.

1. Re-launch the app by double-clicking the jar file.<br>
1. Re-launch the app by double-clicking the jar file.<br>
Expected: The most recent window size and location is retained.

1. _{ more test cases …​ }_
Expand All @@ -412,35 +460,35 @@ testers are expected to do more *exploratory* testing.

1. Adding a person

1. Prerequisites: Open the application
1. Prerequisites: Open the application

Expected: Similar to previous.
Expected: Similar to previous.

1. _{ more test cases …​ }_

### Deleting a person

1. Deleting a person while all persons are being shown

1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.

1. Test case: `delete 1`<br>
Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated.
1. Test case: `delete 1`<br>
Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated.

1. Test case: `delete 0`<br>
Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.
1. Test case: `delete 0`<br>
Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.

1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)<br>
Expected: Similar to previous.
1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)<br>
Expected: Similar to previous.

1. _{ more test cases …​ }_

### Saving data to JSON

1. Dealing with missing/corrupted data files

1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_
1. _{ explain how the room number formatting requires dates }_
1. _{ tbc }_
1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_
1. _{ explain how the room number formatting requires dates }_
1. _{ tbc }_

1. _{ more test cases …​ }_
38 changes: 19 additions & 19 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,26 +70,26 @@ Dormie is a **desktop app for managing contacts, optimized for use via a Command

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

- MacOS: [Java 11](https://www.oracle.com/sg/java/technologies/javase/jdk11-archive-downloads.html)
- Windows: [Java 11](https://www.azul.com/downloads/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jdk-fx#zulu)
- MacOS: [Java 11](https://www.oracle.com/sg/java/technologies/javase/jdk11-archive-downloads.html)
- Windows: [Java 11](https://www.azul.com/downloads/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jdk-fx#zulu)

1. Download the latest `dormie.jar` from [here](https://github.com/AY2324S2-CS2103T-F11-4/tp/releases).

1. Create a new _Home Folder_ you want Dormie to permanently reside in.

- Move Dormie into the _Home Folder_
- This is where Dormie and all it's supporting data will be stored
- Move Dormie into the _Home Folder_
- This is where Dormie and all it's supporting data will be stored

1. Open a command terminal (`Terminal` for MacOS, or `Windows Terminal` for Windows)

- MacOS:
1. Right click the _Home Folder_
2. Left click `Services`
3. Then, click `New Terminal at Folder`
- Windows:
1. Navigate into the _Home Folder_
2. Right click anywhere inside the _Home Folder_
3. Left click `Open in Windows Terminal`
- MacOS:
1. Right click the _Home Folder_
2. Left click `Services`
3. Then, click `New Terminal at Folder`
- Windows:
1. Navigate into the _Home Folder_
2. Right click anywhere inside the _Home Folder_
3. Left click `Open in Windows Terminal`

1. Paste this Command into the new terminal window `java -jar dormie.jar` and press enter.<br>
A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.<br>
Expand All @@ -98,13 +98,13 @@ Dormie is a **desktop app for managing contacts, optimized for use via a Command
1. Type the command in the command box and press Enter to execute it.<br>
Quick Tutorial:

- `add n/John Doe p/98765432 ` : Adds a contact named `John Doe` to Dormie with the specified phone number
- `add n/John Doe p/98765432 ` : Adds a contact named `John Doe` to Dormie with the specified phone number

- `find John` : Finds a contact with `John` in his name.
- `find John` : Finds a contact with `John` in his name.

- `delete 1` : Deletes the 1st contact shown in the current list.
- `delete 1` : Deletes the 1st contact shown in the current list.

- `list` : Lists all contacts again.
- `list` : Lists all contacts again.

1. Refer to [Features](#features) below for details of each command
or to [Command Summary](#command-summary) for a summary of the commands.
Expand Down Expand Up @@ -224,9 +224,9 @@ Example:
- No 2 people can share the same `PHONE_NUMBER`, `EMAIL`, or `TELEGRAM_HANDLE`.
- If `freeTimeTags` are edited, the person's `freeTimeTags` will be replaced with the new set of `freeTimeTags`.
- Example:
- Let Joe have a `freeTimeTag`:`Mon:1300-1400` and have the index 1:
- `edit 1 ft/`: Will delete the existing `freeTimeTags`
- `edit 1 ft/Tue:1300-1400 ft/Wed:1300-1400` Will replace the existing _Monday_ tag with the _Tuesday_ and _Wednesday_ tag.
- Let Joe have a `freeTimeTag`:`Mon:1300-1400` and have the index 1:
- `edit 1 ft/`: Will delete the existing `freeTimeTags`
- `edit 1 ft/Tue:1300-1400 ft/Wed:1300-1400` Will replace the existing _Monday_ tag with the _Tuesday_ and _Wednesday_ tag.

### Saving the data

Expand Down
32 changes: 24 additions & 8 deletions docs/team/larainezo.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,29 @@ layout: default.md
title: "Laraine's Project Portfolio Page"
---

### Project: Dormie
# Project: Dormie

## Project Overview
![Image of Dormie](../images/Ui.png)
Dormie is an application developed for college students living in dorms. It helps them connect with their dorm mates in a simple way. With Dormie, they can easily see when their friends are free, and keep track of their important dates and contact details. It makes organising social events less stressful and helps students stay connected with each other.

Given below are my contributions to the project.
## Technical Details
Developed with Java and JavaFX, the application employs object-oriented classes to maintain code consistency and organization.

* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2324s2.github.io/tp-dashboard/?search=laraine&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code~other&since=2024-02-23&tabOpen=true&tabType=authorship&tabAuthor=larainezo&tabRepo=AY2324S2-CS2103T-F11-4%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false)
* **New Feature**: Added the ability to add/remove freeTime tags.
## Challenges and Problem Solving
One challenge I faced was devising an efficient algorithm to display the availability of friends. Specifically, I needed to create commands that would allow for the quick addition and deletion of free time tags for each contact. To tackle this, I shifted my focus from prioritizing speed to accuracy. The latter was more crucial because my solution had to be bug-free to enhance user experience, which was a primary focus of our project.

Additionally, as the group leader, I encountered the challenge of managing project timelines to prevent overruns. Initially, we brainstormed numerous features to enhance Dormie's functionality. However, given our limited one-month timeframe for implementation, I mitigated this challenge by conducting triage and prioritizing features based on their usefulness.

Overall, the support from everyone in the team eventually allowed for the successful completion of the project!

## Results and Impact
After three productive iterations, we successfully developed Dormie, a user-friendly application that empowers students to make the most of its features with an easy-to-follow user guide. Dormie now facilitates effortless and purposeful bonding within student dormitories.

## My contributions to the project
**[Github Code Repository](https://github.com/AY2324S2-CS2103T-F11-4/tp)**
### Code contributed: [RepoSense link](https://nus-cs2103-ay2324s2.github.io/tp-dashboard/?search=laraine&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code~other&since=2024-02-23&tabOpen=true&tabType=authorship&tabAuthor=larainezo&tabRepo=AY2324S2-CS2103T-F11-4%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false)
* **New Feature: Added the ability to add/remove freeTime tags.**
* What it does: allows the user to add/remove freeTime tags for each contact.
* Justification: This feature improves the product significantly because different contacts can have changing free time and the app should provide a convenient way to modify them.
* Highlights: The implementation was challenging as it required changes to existing add/edit contact commands and modifications to data structures (i.e. HashSet).
Expand All @@ -24,13 +39,14 @@ Given below are my contributions to the project.
* Wrote additional tests for add/remove freeTime tag commands [\#94](https://github.com/AY2324S2-CS2103T-F11-4/tp/pull/94) [\#86](https://github.com/AY2324S2-CS2103T-F11-4/tp/pull/86)
* Added welcome message and a quick guide to display to users when the application starts [\#124](https://github.com/AY2324S2-CS2103T-F11-4/tp/pull/124)
* Added logging for actions performed on contact [\#92](https://github.com/AY2324S2-CS2103T-F11-4/tp/pull/92)
* **Documentation**:

### Documentation
* User Guide:
* Added documentation for the features `addTime` and `deleteTime`
* Added documentation for the features `addTime` and `deleteTime` [\#221](https://github.com/AY2324S2-CS2103T-F11-4/tp/pull/221)
* Added instructions on how to use the documentation [\#129](https://github.com/AY2324S2-CS2103T-F11-4/tp/pull/129)
* Did cosmetic tweaks to existing documentation of features [\#139](https://github.com/AY2324S2-CS2103T-F11-4/tp/pull/139)
* Developer Guide:
* Added implementation details of the `addTime` feature. [\#87](https://github.com/AY2324S2-CS2103T-F11-4/tp/pull/87)
* Added implementation details of the `deleteTime` feature.
* **Community**:
* Added implementation details of the `deleteTime` feature. [\#231](https://github.com/AY2324S2-CS2103T-F11-4/tp/pull/231)
### Community
* PRs reviewed (with non-trivial review comments): [\#78](https://github.com/AY2324S2-CS2103T-F11-4/tp/pull/78
Loading

0 comments on commit 8b04b60

Please sign in to comment.