Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/AY2324S1-CS2103T-T13-3/tp: (57 commits)
  Update final PPP
  Format DG
  Update Benjamin PPP
  Final line EOF
  Update DG - Refine Content
  Update UG
  Update PPP
  Change all predicates
  Fix optional
  Remove imports
  Refractor methods
  Add Author
  Add extra test cases to codebase
  Add back missing update delivery
  Clean checkstyle
  Update UG print
  Fix Checkstyle
  Add Test Coverage for non-trivial paths
  Add Test Coverage for non-trivial paths
  Cleanup transformer
  ...
  • Loading branch information
Gabriel4357 committed Nov 14, 2023
2 parents c31a6e8 + 8bfe8bc commit 3d3bce5
Show file tree
Hide file tree
Showing 104 changed files with 3,548 additions and 2,544 deletions.
2,612 changes: 1,254 additions & 1,358 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

926 changes: 741 additions & 185 deletions docs/UserGuide.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/diagrams/ArchitectureSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ 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 : "customer delete 1"
activate ui UI_COLOR

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

logic -[LOGIC_COLOR]> model : deletePerson(p)
logic -[LOGIC_COLOR]> model : deleteCustomer(c)
activate model MODEL_COLOR

model -[MODEL_COLOR]-> logic
Expand Down
31 changes: 14 additions & 17 deletions docs/diagrams/CustomerAddActivityDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,21 @@ skin rose
skinparam ActivityFontSize 15
skinparam ArrowFontSize 12
!pragma useVerticalIf on
start
:User executes customer add command;
:Parse command string;

if () then ([else])
:ParseException: Invalid Command Format;
stop
( [all fields are filled and valid]) elseif () then ([else])
:CommandException: User Not Authenticated;
stop
( [user is logged in]) elseif () then ([else])
:CommandException: Duplicate Customer;
stop
else ( [Customer does not exist in the database])

endif
:Customer add command is executed successfully.
Customer is added to the database.;
start
:User executes <i>customer add</i> command;
partition CustomerAddCommand {
if () then ([else])
:CommandException: User Not Authenticated;
stop
( [user logged in]) elseif () then ([else])
:CommandException: Duplicate Customer;
stop
else ( [customer not already in database])
endif
:Customer added;
}

stop

@enduml
12 changes: 5 additions & 7 deletions docs/diagrams/CustomerAddSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ AddressBookParser -> CustomerAddCommandParser : parse(arg)
activate CustomerAddCommandParser

create Customer
CustomerAddCommandParser -> Customer : new Customer(name, phone, email, address)
activate Customer
CustomerAddCommandParser -> Customer

Customer --> CustomerAddCommandParser
deactivate Customer

create CustomerAddCommand
CustomerAddCommandParser -> CustomerAddCommand : new CustomerAddCommand(c)
CustomerAddCommandParser -> CustomerAddCommand
activate CustomerAddCommand

CustomerAddCommand --> CustomerAddCommandParser
Expand All @@ -62,23 +61,22 @@ activate Model
Model --> CustomerAddCommand : isLoggedIn
deactivate Model

CustomerAddCommand -> Model : hasPerson(c)
CustomerAddCommand -> Model : hasCustomer(c)
activate Model

Model --> CustomerAddCommand
deactivate Model

CustomerAddCommand -> Model : addPerson(c)
CustomerAddCommand -> Model : addCustomer(c)
activate Model

Model --> CustomerAddCommand
deactivate Model

create CommandResult
CustomerAddCommand -> CommandResult
activate CommandResult

CommandResult --> CustomerAddCommand
CommandResult --> CustomerAddCommand : result
deactivate CommandResult

CustomerAddCommand --> LogicManager : result
Expand Down
61 changes: 31 additions & 30 deletions docs/diagrams/DeleteSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -5,66 +5,67 @@ skinparam ArrowFontStyle plain
box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":DeleteCommandParser" as DeleteCommandParser LOGIC_COLOR
participant "d:DeleteCommand" as DeleteCommand LOGIC_COLOR
participant ":CustomerDeleteCommandParser" as CustomerDeleteCommandParser LOGIC_COLOR
participant "d:CustomerDeleteCommand" as CustomerDeleteCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
end box

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

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

create DeleteCommandParser
AddressBookParser -> DeleteCommandParser
activate DeleteCommandParser
create CustomerDeleteCommandParser
AddressBookParser -> CustomerDeleteCommandParser
activate CustomerDeleteCommandParser

DeleteCommandParser --> AddressBookParser
deactivate DeleteCommandParser
CustomerDeleteCommandParser --> AddressBookParser
deactivate CustomerDeleteCommandParser

AddressBookParser -> DeleteCommandParser : parse("1")
activate DeleteCommandParser
AddressBookParser -> CustomerDeleteCommandParser : parse("1")
activate CustomerDeleteCommandParser

create DeleteCommand
DeleteCommandParser -> DeleteCommand
activate DeleteCommand
create CustomerDeleteCommand
CustomerDeleteCommandParser -> CustomerDeleteCommand
activate CustomerDeleteCommand

DeleteCommand --> DeleteCommandParser : d
deactivate DeleteCommand
CustomerDeleteCommand --> CustomerDeleteCommandParser : d
deactivate CustomerDeleteCommand

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

AddressBookParser --> LogicManager : d
deactivate AddressBookParser

LogicManager -> DeleteCommand : execute()
activate DeleteCommand
LogicManager -> CustomerDeleteCommand : execute()
activate CustomerDeleteCommand

DeleteCommand -> Model : deletePerson(1)
CustomerDeleteCommand -> Model : deleteCustomer(1)
activate Model

Model --> DeleteCommand
Model --> CustomerDeleteCommand
deactivate Model

create CommandResult
DeleteCommand -> CommandResult
CustomerDeleteCommand -> CommandResult
activate CommandResult

CommandResult --> DeleteCommand
CommandResult --> CustomerDeleteCommand : result
deactivate CommandResult

DeleteCommand --> LogicManager : result
deactivate DeleteCommand

[<--LogicManager
CustomerDeleteCommand --> LogicManager : result
deactivate CustomerDeleteCommand
CustomerDeleteCommand -[hidden]-> LogicManager
destroy CustomerDeleteCommand
[<--LogicManager : result
deactivate LogicManager
@enduml
7 changes: 6 additions & 1 deletion docs/diagrams/DeliveryClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ Class DeliveryDate
Class DeliveryStatus
Class Note

Class DeliveryStatus <<Enumeration>>{
Class DeliveryStatus <<enumeration>>{
<color: #FFFFFF>CREATED
<color: #FFFFFF>SHIPPED
<color: #FFFFFF>CANCELLED
<color: #FFFFFF>COMPLETED
}
show DeliveryStatus fields
Class I<<HIDDEN>> #FFFFFF
}

Expand Down
32 changes: 3 additions & 29 deletions docs/diagrams/DeliveryCreateNoteActivityDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,7 @@ skinparam ArrowFontSize 12

!pragma useVerticalIf on
start
:User enters <i>delivery note</i> command;
partition DeliveryStatusCommandParser {
if () then ([else])
:NullPointerException: Args cannot be Null;
stop
else ([non null arguments provided])
endif
: Tokenize Arguments with Note prefix;
if () then ([else])
:ParseException: Invalid Command Format;
stop
( [prefix present and preamble empty]) elseif () then ([else])
:ParseException: Duplicate Prefix;
stop
( [no duplicate prefix]) elseif () then ([else])
:ParseException: Invalid Delivery ID;
stop
( [valid delivery id]) elseif () then ([else])
:ParseException: Invalid Note;
stop
else ( [valid note])
endif
:Create and Execute DeliveryCreateNoteCommand;
}
:User executes <i>delivery note</i> command;

partition DeliveryCreateNoteCommand {
if () then ([else])
Expand All @@ -37,12 +14,9 @@ partition DeliveryCreateNoteCommand {
( [user logged in]) elseif () then ([else])
:CommandException: Invalid Delivery;
stop
else ( [delivery id found])
else ( [delivery ID found])
endif
: Create Delivery with new note;
: Replace Selected Delivery with Created Delivery;
: Refresh Displayed Delivery List;
: Return CommandResult;
:Update Delivery with new note;
}

stop
Expand Down
23 changes: 10 additions & 13 deletions docs/diagrams/DeliveryCreateNoteSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":DeliveryCreateNoteCommandParser" as DeliveryCreateNoteCommandParser LOGIC_COLOR
participant "d:DeliveryCreateNoteCommand" as DeliveryCreateNoteCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
participant "result:CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
end box

[-> LogicManager : execute("delivery note 1 --note A note")
[-> LogicManager : execute(input)
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("delivery note 1 --note A note")
LogicManager -> AddressBookParser : parseCommand(input)
activate AddressBookParser

create DeliveryCreateNoteCommandParser
Expand All @@ -27,7 +27,7 @@ activate DeliveryCreateNoteCommandParser
DeliveryCreateNoteCommandParser --> AddressBookParser
deactivate DeliveryCreateNoteCommandParser

AddressBookParser -> DeliveryCreateNoteCommandParser : parse("1 --note A note")
AddressBookParser -> DeliveryCreateNoteCommandParser : parse(args)
activate DeliveryCreateNoteCommandParser

create DeliveryCreateNoteCommand
Expand All @@ -46,7 +46,7 @@ destroy DeliveryCreateNoteCommandParser
AddressBookParser --> LogicManager : d
deactivate AddressBookParser

LogicManager -> DeliveryCreateNoteCommand : execute()
LogicManager -> DeliveryCreateNoteCommand : execute(model)
activate DeliveryCreateNoteCommand

DeliveryCreateNoteCommand -> Model : getUserLoginStatus()
Expand All @@ -73,23 +73,20 @@ activate Model
Model --> DeliveryCreateNoteCommand
deactivate Model

DeliveryCreateNoteCommand -> Model : updateFilteredDeliveryList(PREDICATE_SHOW_ALL_DELIVERIES)
activate Model

Model --> DeliveryCreateNoteCommand
deactivate Model

create CommandResult
DeliveryCreateNoteCommand -> CommandResult
activate CommandResult

CommandResult --> DeliveryCreateNoteCommand
CommandResult --> DeliveryCreateNoteCommand : result
deactivate CommandResult

DeliveryCreateNoteCommand --> LogicManager : result
deactivate DeliveryCreateNoteCommand

[<--LogicManager
DeliveryCreateNoteCommand -[hidden]-> LogicManager
destroy DeliveryCreateNoteCommand

[<--LogicManager : result
deactivate LogicManager

@enduml
28 changes: 4 additions & 24 deletions docs/diagrams/DeliveryStatusCommandActivityDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,18 @@ skinparam ArrowFontSize 12

!pragma useVerticalIf on
start
:User enters <i>delivery status</i> command;
partition DeliveryStatusCommandParser {
if () then ([else])
:ParseException: Invalid Command Format;
stop
( [none-empty arguments provided]) elseif () then ([else])
:ParseException: Invalid Command Format;
stop
( [number and word provided]) elseif () then ([else])
:ParseException: Invalid Delivery Status;
stop
( [valid delivery status]) elseif () then ([else])
:ParseException: Invalid Delivery ID;
stop
else ( [valid id])
endif
:Create and Execute DeliveryStatusCommand;
}
:User executes <i>delivery status</i> command;

partition DeliveryStatusCommand {
if () then ([else])
:CommandException: User Not Authenticated;
stop
( [user logged in]) elseif () then ([else])
:CommandException: Invalid Delivery;
:CommandException: Invalid Delivery ID;
stop
else ( [delivery id found])
else ( [delivery ID found])
endif
: Create Delivery with new status;
: Replace Selected Delivery with Created Delivery;
: Refresh Displayed Delivery List;
: Return CommandResult;
: Update Delivery Status;
}


Expand Down
Loading

0 comments on commit 3d3bce5

Please sign in to comment.