Skip to content

Commit

Permalink
Add Command Classes UML diagram
Browse files Browse the repository at this point in the history
Let's,
* Replace XYZCommand class to a Command Class package in all UML
diagrams
* Add the Command Class UML file
  • Loading branch information
KrashKart committed Oct 20, 2024
1 parent fcc61e9 commit 3261f04
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 7 deletions.
61 changes: 61 additions & 0 deletions docs/diagrams/CommandClasses.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
@startuml
!include style.puml
skinparam arrowThickness 1.1
skinparam arrowColor LOGIC_COLOR_T4
skinparam classBackgroundColor LOGIC_COLOR

Class "{abstract}\nCommand" as Command
Class HiddenOutside #FFFFFF

package "Command Classes" as CommandClasses {
together {
Class "{abstract}\nAbstractFindCommand" as AFC
Class "AddCommand" as AC
Class "ClearCommand" as CC
Class "DeleteCommand" as DC
Class "EditCommand" as EdC
Class "ExitCommand" as ExC
Class "FindByEmailCommand" as FEC
Class "FindByNameCommand" as FNC
Class "FindByTagCommand" as FTC
Class "FindByPhoneCommand" as FPC
Class "HelpCommand" as HC
Class "ListCommand" as LC
}
}
HiddenOutside ..> Command

AFC -u-|> Command
AFC -[hidden]right- AC
FEC -u-|> AFC
FNC -u-|> AFC
FTC -u-|> AFC
FPC -u-|> AFC

AC -u-|> Command
AC -[hidden]right- CC
FEC -[hidden]u- AC

CC -u-|> Command
CC -[hidden]right- DC
FEC -[hidden]u- CC

DC -u-|> Command
DC -[hidden]right- EdC
FEC -[hidden]u- DC

EdC -u-|> Command
EdC -[hidden]right- ExC
FEC -[hidden]u- EdC

ExC -u-|> Command
ExC -[hidden]right- HC
FEC -[hidden]u- ExC

HC -u-|> Command
HC -[hidden]right- LC
FEC -[hidden]u- HC

LC -u-|> Command
FEC -[hidden]u- LC
@enduml
8 changes: 4 additions & 4 deletions docs/diagrams/LogicClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ package Logic as LogicPackage {

package "Parser Classes" as ParserClasses{
}
Class XYZCommand
package "Command Classes" as CommandClasses{
}
Class CommandResult
Class "{abstract}\nCommand" as Command

Expand All @@ -29,17 +30,16 @@ HiddenOutside ..> Logic

LogicManager .right.|> Logic
LogicManager -right->"1" ParserClasses
ParserClasses ..> XYZCommand : <<create>>
ParserClasses ..> CommandClasses : <<create>>

XYZCommand -up-|> Command
CommandClasses -up-|> Command
LogicManager .left.> Command : <<call>>

LogicManager --> Model
LogicManager --> Storage
Storage --[hidden] Model
Command .[hidden]up.> Storage
Command .right.> Model
note right of XYZCommand: XYZCommand = AddCommand, \nFindCommand, etc

Logic ..> CommandResult
LogicManager .down.> CommandResult
Expand Down
7 changes: 4 additions & 3 deletions docs/diagrams/ParserClasses.puml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ skinparam arrowColor LOGIC_COLOR_T4
skinparam classBackgroundColor LOGIC_COLOR

Class "{abstract}\nCommand" as Command
Class XYZCommand
package "Command Classes" as CommandClasses {
}

package "Parser classes"{
Class "<<interface>>\nParser" as Parser
Expand All @@ -23,7 +24,7 @@ HiddenOutside ..> CampusConnectParser

CampusConnectParser .down.> XYZCommandParser: <<create>>

XYZCommandParser ..> XYZCommand : <<create>>
XYZCommandParser ..> CommandClasses : <<create>>
CampusConnectParser ..> Command : <<use>>
XYZCommandParser .up.|> Parser
XYZCommandParser ..> ArgumentMultimap
Expand All @@ -34,5 +35,5 @@ CliSyntax ..> Prefix
XYZCommandParser ..> ParserUtil
ParserUtil .down.> Prefix
ArgumentTokenizer .down.> Prefix
XYZCommand -up-|> Command
CommandClasses -up-|> Command
@enduml

0 comments on commit 3261f04

Please sign in to comment.