Skip to content
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

Update DG #145

Merged
merged 3 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,14 @@ How the parsing works:
### Model component
**API** : [`Model.java`](https://github.com/AY2324S1-CS2103T-T13-0/tp/blob/master/src/main/java/seedu/address/model/Model.java)

<puml src="diagrams/ModelClassDiagram.puml" width="450" />
<img src="diagrams/ModelClassDiagram.png" width="450" />


The `Model` component,

* stores the module plan data i.e., all `Module` objects (which are contained in a `UniqueModuleList` object).
* stores the module plan of each semester i.e., all `ModulePlanSemester` in one `ModulePlanSemesterList`.
* * stores the module plan data i.e., all `Module` objects (which are contained in a `UniqueModuleList` object).
* each module plan of a semester contains a `Semester` and a `Year` for identification and stores a `UniqueModuleList`.
* stores the currently 'selected' `Module` objects (e.g., results of a search query) as a separate _filtered_ list which is exposed to outsiders as an unmodifiable `ObservableList<Module>` 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.
* stores a `UserPref` object that represents the user’s preferences. This is exposed to the outside as a `ReadOnlyUserPref` objects.
* 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)
Expand Down
Binary file added docs/ModelClassDiagram/Model.png

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks the same as the other image?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/diagrams/ArchitectureSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ Participant ":Logic" as logic LOGIC_COLOR
Participant ":Model" as model MODEL_COLOR
Participant ":Storage" as storage STORAGE_COLOR

user -[USER_COLOR]> ui : "delete 1"
user -[USER_COLOR]> ui : "delete CS2030S"
activate ui UI_COLOR

ui -[UI_COLOR]> logic : execute("delete 1")
ui -[UI_COLOR]> logic : execute("delete CS2030S")
activate logic LOGIC_COLOR

logic -[LOGIC_COLOR]> model : deletePerson(p)
logic -[LOGIC_COLOR]> model : deleteModule(CS2030S)
activate model MODEL_COLOR

model -[MODEL_COLOR]-> logic
deactivate model

logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook)
logic -[LOGIC_COLOR]> storage : saveModulePlan(modulePlan)
activate storage STORAGE_COLOR

storage -[STORAGE_COLOR]> storage : Save to file
Expand Down
24 changes: 12 additions & 12 deletions docs/diagrams/DeleteSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":ModulePlanParser" as ModulePlanParser LOGIC_COLOR
participant ":DeleteCommandParser" as DeleteCommandParser LOGIC_COLOR
participant "d:DeleteCommand" as DeleteCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
Expand All @@ -14,20 +14,20 @@ box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
end box

[-> LogicManager : execute("delete 1")
[-> LogicManager : execute("delete CS2030S")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("delete 1")
activate AddressBookParser
LogicManager -> ModulePlanParser : parseCommand("delete CS2030S")
activate ModulePlanParser

create DeleteCommandParser
AddressBookParser -> DeleteCommandParser
ModulePlanParser -> DeleteCommandParser
activate DeleteCommandParser

DeleteCommandParser --> AddressBookParser
DeleteCommandParser --> ModulePlanParser
deactivate DeleteCommandParser

AddressBookParser -> DeleteCommandParser : parse("1")
ModulePlanParser -> DeleteCommandParser : parse("CS2030S")
activate DeleteCommandParser

create DeleteCommand
Expand All @@ -37,19 +37,19 @@ activate DeleteCommand
DeleteCommand --> DeleteCommandParser : d
deactivate DeleteCommand

DeleteCommandParser --> AddressBookParser : d
DeleteCommandParser --> ModulePlanParser : d
deactivate DeleteCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
DeleteCommandParser -[hidden]-> AddressBookParser
DeleteCommandParser -[hidden]-> ModulePlanParser
destroy DeleteCommandParser

AddressBookParser --> LogicManager : d
deactivate AddressBookParser
ModulePlanParser --> LogicManager : d
deactivate ModulePlanParser

LogicManager -> DeleteCommand : execute()
activate DeleteCommand

DeleteCommand -> Model : deletePerson(1)
DeleteCommand -> Model : deleteModule(CS2030S)
activate Model

Model --> DeleteCommand
Expand Down
2 changes: 1 addition & 1 deletion docs/diagrams/LogicClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Class HiddenOutside #FFFFFF
HiddenOutside ..> Logic

LogicManager .right.|> Logic
LogicManager -right->"1" AddressBookParser
LogicManager -right->"1" ModulePlanParser
AddressBookParser ..> XYZCommand : creates >

XYZCommand -up-|> Command
Expand Down
Binary file added docs/diagrams/ModelClassDiagram.png

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to make it more obvious which side the multiplicity is for.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated👍

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/main/java/seedu/address/model/moduleplan/ModulePlan.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class ModulePlan implements ReadOnlyModulePlan {
public ModulePlan() {}

/**
* Creates an AddressBook using the Persons in the {@code toBeCopied}
* Creates an ModulePlan using the Modules in the {@code toBeCopied}
*/
public ModulePlan(ReadOnlyModulePlan toBeCopied) {
this();
Expand All @@ -42,7 +42,7 @@ public ModulePlan(ReadOnlyModulePlan toBeCopied) {


/**
* Resets the existing data of this {@code AddressBook} with {@code newData}.
* Resets the existing data of this {@code ModulePlan} with {@code newData}.
*/
public void resetData(ReadOnlyModulePlan newData) {
requireNonNull(newData);
Expand Down
Loading