Skip to content

Commit 46a3b67

Browse files
Merge pull request nus-cs2103-AY2223S2#119 from ARPspoofing/update-dg
Update dg
2 parents acc8ab2 + 59c3e32 commit 46a3b67

15 files changed

+356
-30
lines changed

docs/DeveloperGuide.md

Lines changed: 162 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Refer to the guide [_Setting up and getting started_](SettingUp.md).
2323

2424
<div markdown="span" class="alert alert-primary">
2525

26-
:bulb: **Tip:** The `.puml` files used to create diagrams in this document can be found in the [diagrams](https://github.com/se-edu/addressbook-level3/tree/master/docs/diagrams/) folder. Refer to the [_PlantUML Tutorial_ at se-edu/guides](https://se-education.org/guides/tutorials/plantUml.html) to learn how to create and edit diagrams.
26+
:bulb: **Tip:** The `.puml` files used to create diagrams in this document can be found in the [diagrams](https://github.com/AY2223S2-CS2103-F11-1/tp/tree/master/docs/diagrams/) folder. Refer to the [_PlantUML Tutorial_ at se-edu/guides](https://se-education.org/guides/tutorials/plantUml.html) to learn how to create and edit diagrams.
2727
</div>
2828

2929
### Architecture
@@ -36,7 +36,7 @@ Given below is a quick overview of main components and how they interact with ea
3636

3737
**Main components of the architecture**
3838

39-
**`Main`** has two classes called [`Main`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/Main.java) and [`MainApp`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/MainApp.java). It is responsible for,
39+
**`Main`** has two classes called [`Main`](https://github.com/AY2223S2-CS2103-F11-1/tp/tree/master/src/main/java/seedu/address/Main.java) and [`MainApp`](https://github.com/AY2223S2-CS2103-F11-1/tp/tree/master/src/main/java/seedu/address/MainApp.java). It is responsible for,
4040
* At app launch: Initializes the components in the correct sequence, and connects them up with each other.
4141
* At shut down: Shuts down the components and invokes cleanup methods where necessary.
4242

@@ -69,7 +69,7 @@ The sections below give more details of each component.
6969

7070
### UI component
7171

72-
The **API** of this component is specified in [`Ui.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/Ui.java)
72+
The **API** of this component is specified in [`Ui.java`](https://github.com/AY2223S2-CS2103-F11-1/tp/tree/master/src/main/java/seedu/address/ui/Ui.java)
7373

7474
![Structure of the UI Component](images/UiClassDiagram.png)
7575

@@ -86,7 +86,7 @@ The `UI` component,
8686

8787
### Logic component
8888

89-
**API** : [`Logic.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/logic/Logic.java)
89+
**API** : [`Logic.java`](https://github.com/AY2223S2-CS2103-F11-1/tp/tree/master/src/main/java/seedu/address/logic/Logic.java)
9090

9191
Here's a (partial) class diagram of the `Logic` component:
9292

@@ -114,28 +114,42 @@ How the parsing works:
114114
* All `XYZCommandParser` classes (e.g., `AddCommandParser`, `DeleteCommandParser`, ...) inherit from the `Parser` interface so that they can be treated similarly where possible e.g, during testing.
115115

116116
### Model component
117-
**API** : [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/model/Model.java)
117+
**API** : [`Model.java`](https://github.com/AY2223S2-CS2103-F11-1/tp/tree/master/src/main/java/seedu/address/model/Model.java)
118118

119119
<img src="images/ModelClassDiagram.png" width="450" />
120120

121121

122122
The `Model` component,
123123

124-
* stores the address book data i.e., all `Person` objects (which are contained in a `UniquePersonList` object).
124+
* stores the address book data i.e., all `Person`, `Consultation`, `Tutorial`, `Lab` objects (which are contained in a `UniquePersonList`, `UniqueConsultationList`, `UniqueTutorialList`, `UniqueLabList` objects respectively).
125125
* stores the currently 'selected' `Person` objects (e.g., results of a search query) as a separate _filtered_ list which is exposed to outsiders as an unmodifiable `ObservableList<Person>` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.
126+
* stores the currently 'selected' `Tutorial` objects (e.g., results of a filter / sort query) as a separate _filtered_ list which is exposed to outsiders as an unmodifiable `ObservableList<Tutorial>` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.
127+
* stores the currently 'selected' `Consultation` objects (e.g., results of a filter / sort query) as a separate _filtered_ list which is exposed to outsiders as an unmodifiable `ObservableList<Consultation>` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.
128+
* stores the currently 'selected' `Lab` objects (e.g., results of a filter / sort query) as a separate _filtered_ list which is exposed to outsiders as an unmodifiable `ObservableList<Lab>` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.
126129
* stores a `UserPref` object that represents the user’s preferences. This is exposed to the outside as a `ReadOnlyUserPref` objects.
127130
* does not depend on any of the other three components (as the `Model` represents data entities of the domain, they should make sense on their own without depending on other components)
131+
* It might seem strange at first as to why can Tutorial, Lab and Consultation exist without students. How can a Tutorial or Lab or Consultation be conducted without students in the first place? That is because the purpose of our application is to remind TAs that they are supposed to attend an event. During the event itself, the TA will add students to the event for attendance taking.
132+
* Thereafter, the TA will be able to edit the performance (score) of the student for the event related task.
128133

129134
<div markdown="span" class="alert alert-info">:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `AddressBook`, which `Person` references. This allows `AddressBook` to only require one `Tag` object per unique tag, instead of each `Person` needing their own `Tag` objects.<br>
130-
131135
<img src="images/BetterModelClassDiagram.png" width="450" />
136+
</div>
132137

138+
<div markdown="span" class="alert alert-info">:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Event` abstract class in the `AddressBook`, which `Tutorial` inherits from.<br>
139+
<img src="images/BetterTutorialClassDiagram.png" width="450" />
133140
</div>
134141

142+
<div markdown="span" class="alert alert-info">:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Event` abstract class in the `AddressBook`, which `Lab` inherits from.<br>
143+
<img src="images/BetterLabClassDiagram.png" width="450" />
144+
</div>
145+
146+
<div markdown="span" class="alert alert-info">:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Event` abstract class in the `AddressBook`, which `Consultation` inherits from.<br>
147+
<img src="images/BetterConsultationClassDiagram.png" width="450" />
148+
</div>
135149

136150
### Storage component
137151

138-
**API** : [`Storage.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/storage/Storage.java)
152+
**API** : [`Storage.java`](https://github.com/AY2223S2-CS2103-F11-1/tp/tree/master/src/main/java/seedu/address/storage/Storage.java)
139153

140154
<img src="images/StorageClassDiagram.png" width="550" />
141155

@@ -341,28 +355,157 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
341355

342356
(For all use cases below, the **System** is the `TrAcker` and the **Actor** is the `user`, unless specified otherwise)
343357

344-
Old use cases examples
358+
---
359+
System: Software System (TrAcker)
360+
<br>
361+
Use case: UC01 - Add Tutorial lessons
362+
<br>
363+
Person: An undergraduate student in NUS enrolled in CS2040 as a student
364+
<br>
365+
Actor: CS2040 Tutorial Teaching Assistant (TA)
366+
<br>
367+
Precondition: TA has access to the TrAcker application
368+
369+
**MSS**
370+
371+
1. TA starts TrAcker desktop application.
372+
2. TA enters command to create new tutorial.
373+
3. TA confirms creation of tutorial.
374+
4. TrAcker displays the new tutorial event.
375+
376+
Use case ends.
377+
378+
**Extensions**
379+
380+
* 3a. TrAcker detects an error in the entered tutorial data.
381+
* 3a1. TrAcker requests for the correct tutorial data where there was an error.
382+
* 3a2. TA enters new tutorial data.
383+
Steps 3a1 - 3a2 are repeated until the data entered to create a new tutorial are correct.
384+
<br>
385+
Use case resumes from Step 4.
386+
387+
* a. At any time, TA decides not to create a new tutorial.
388+
* a1. TA removes input from TrAcker.
389+
390+
Use case ends
391+
392+
---
393+
System: Software System (TrAcker)
394+
<br>
395+
Use case: UC02 - Add Lab lessons
396+
<br>
397+
Person: An undergraduate student in NUS enrolled in CS2040 as a student
398+
<br>
399+
Actor: CS2040 Lab Teaching Assistant (TA)
400+
<br>
401+
Precondition: TA has access to the TrAcker application
345402

346403
**MSS**
347404

348-
1. User requests to list students
349-
2. TrAcker shows a list of students
350-
3. User requests to remove student who dropped the module from the list
351-
4. TrAcker deletes the person
405+
1. TA starts TrAcker desktop application.
406+
2. TA enters command to create new lab.
407+
3. TA confirms creation of lab.
408+
4. TrAcker displays the new lab event.
352409

353-
Use case ends.
410+
Use case ends.
354411

355412
**Extensions**
356413

357-
* 2a. There are no students.
414+
* 3a. TrAcker detects an error in the entered lab data.
415+
* 3a1. TrAcker requests for the correct lab data where there was an error.
416+
* 3a2. TA enters new lab data.
417+
Steps 3a1 - 3a2 are repeated until the data entered to create a new lab are correct.
418+
<br>
419+
Use case resumes from Step 4.
358420

359-
Use case ends.
421+
* a. At any time, TA decides not to create a new lab.
422+
* a1. TA removes input from TrAcker.
360423

361-
* 3a. The given index is invalid.
424+
Use case ends
362425

363-
* 3a1. TrAcker shows an error message.
426+
---
427+
System: Software System (TrAcker)
428+
<br>
429+
Use case: UC03 - Add Consultation lessons
430+
<br>
431+
Person: An undergraduate student in NUS enrolled in CS2040 as a student
432+
<br>
433+
Actor: CS2040 Teaching Assistant (TA)
434+
<br>
435+
Precondition: TA has access to the TrAcker application
436+
437+
**MSS**
438+
439+
1. TA starts TrAcker desktop application.
440+
2. TA enters command to create new consultation.
441+
3. TA confirms creation of consultation.
442+
4. TrAcker displays the new consultation event.
443+
444+
Use case ends.
445+
446+
**Extensions**
447+
448+
* 3a. TrAcker detects an error in the entered consultation data.
449+
* 3a1. TrAcker requests for the correct consultation data where there was an error.
450+
* 3a2. TA enters new consultation data.
451+
Steps 3a1 - 3a2 are repeated until the data entered to create a new consultation are correct.
452+
<br>
453+
Use case resumes from Step 4.
454+
455+
* a. At any time, TA decides not to create a new consultation.
456+
* a1. TA removes input from TrAcker.
457+
458+
Use case ends.
459+
460+
---
461+
System: Software System (TrAcker)
462+
<br>
463+
Use case: UC04 - Add students to event
464+
<br>
465+
Person: An undergraduate student in NUS enrolled in CS2040 as a student
466+
<br>
467+
Actor: CS2040 Teaching Assistant (TA)
468+
<br>
469+
Preconditions:
470+
- TA has access to the TrAcker application
471+
472+
**MSS**
473+
474+
1. TA starts TrAcker desktop application.
475+
2. TA enters command to add student to an event.
476+
3. TA confirms addition of student to an event.
477+
4. TrAcker marks the student's attendance as present.
478+
5. TrAcker displays the new student in the event.
479+
480+
Use case ends.
481+
482+
**Extensions**
364483

365-
Use case resumes at step 2.
484+
* 3a. TrAcker detects that the event does not exist.
485+
* 3a1. TrAcker requests for the correct event data.
486+
* 3a2. TA enters new event data that the student should be added to.
487+
Steps 3a1 - 3a2 are repeated until the event data entered is correct and exists.
488+
<br>
489+
Use case resumes from Step 4.
490+
491+
* 3b. TrAcker detects that the student does not exist.
492+
* 3b1. TrAcker requests for the correct student data.
493+
* 3b2. TA enters new student data.
494+
Steps 3b1 - 3b2 are repeated until the student data entered is correct and exists.
495+
<br>
496+
Use case resumes from Step 4.
497+
498+
* 3c. TrAcker detects that the data entered is in a wrong format.
499+
* 3c1. TrAcker requests for the correct data format.
500+
* 3c2. TA enters new data format.
501+
Steps 3c1 - 3c2 are repeated until the data format is correct.
502+
<br>
503+
Use case resumes from Step 4.
504+
505+
* a. At any time, TA decides not to add a student to the event.
506+
* a1. TA removes input from TrAcker.
507+
508+
Use case ends
366509

367510
*{More to be added}*
368511

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@startuml
2+
!include style.puml
3+
skinparam arrowThickness 1.1
4+
skinparam arrowColor MODEL_COLOR
5+
skinparam classBackgroundColor MODEL_COLOR
6+
7+
Class "{abstract}\nEvent" as Event
8+
9+
AddressBook *-> "1" UniquePersonList
10+
AddressBook *--> "1" UniqueConsultationList
11+
12+
UniquePersonList -right-> Person
13+
UniqueConsultationList -right-> Consultation
14+
15+
Consultation -up-|> Event
16+
17+
Consultation *--> "1" Name
18+
Consultation *--> "1" LocalDate
19+
Consultation *--> "*" Note
20+
Consultation *--> "*" Person
21+
22+
@enduml
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@startuml
2+
!include style.puml
3+
skinparam arrowThickness 1.1
4+
skinparam arrowColor MODEL_COLOR
5+
skinparam classBackgroundColor MODEL_COLOR
6+
7+
Class "{abstract}\nEvent" as Event
8+
9+
AddressBook *-> "1" UniquePersonList
10+
AddressBook *--> "1" UniqueLabList
11+
12+
UniquePersonList -right-> Person
13+
UniqueLabList -right-> Lab
14+
15+
Lab -up-|> Event
16+
17+
Lab *--> "1" Name
18+
Lab *--> "1" LocalDate
19+
Lab *--> "*" Note
20+
Lab *--> "*" Person
21+
22+
@enduml

docs/diagrams/BetterModelClassDiagram.puml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@ Person *--> Name
1818
Person *--> Phone
1919
Person *--> Email
2020
Person *--> Address
21+
Person *--> Performance
22+
Person *--> Profile
23+
Person *--> Remark
2124
@enduml
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@startuml
2+
!include style.puml
3+
skinparam arrowThickness 1.1
4+
skinparam arrowColor MODEL_COLOR
5+
skinparam classBackgroundColor MODEL_COLOR
6+
7+
Class "{abstract}\nEvent" as Event
8+
9+
AddressBook *-> "1" UniquePersonList
10+
AddressBook *--> "1" UniqueTutorialList
11+
12+
UniquePersonList -right-> Person
13+
UniqueTutorialList -right-> Tutorial
14+
15+
Tutorial -up-|> Event
16+
17+
Tutorial *--> "1" Name
18+
Tutorial *--> "1" LocalDate
19+
Tutorial *--> "*" Note
20+
Tutorial *--> "*" Person
21+
22+
@enduml

docs/diagrams/DeleteSequenceDiagram.puml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ box Model MODEL_COLOR_T1
1313
participant ":Model" as Model MODEL_COLOR
1414
end box
1515

16-
[-> LogicManager : execute("delete 1")
16+
[-> LogicManager : execute("rm 1")
1717
activate LogicManager
1818

19-
LogicManager -> AddressBookParser : parseCommand("delete 1")
19+
LogicManager -> AddressBookParser : parseCommand("rm 1")
2020
activate AddressBookParser
2121

2222
create DeleteCommandParser

0 commit comments

Comments
 (0)