Skip to content

Commit

Permalink
Merge pull request #125 from marcellaantania/DG-updates-diagrams
Browse files Browse the repository at this point in the history
Dg updates diagrams
  • Loading branch information
nixonwidjaja authored Nov 2, 2023
2 parents c940484 + f40a997 commit 9357e67
Show file tree
Hide file tree
Showing 10 changed files with 197 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Exported_CSVs/testExport.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Name,Phone,Email,Address,Salary,Claim Budget,DOB,Department,Leave
Alice Pauline,94351253,[email protected],"123, Jurong West Ave 6, #08-111",10000,5000,2000-01-01,Engineering,"Jan, Feb, Mar, Apr, Jun, Aug, Oct, Dec"
Benson Meier,98765432,[email protected],"311, Clementi Ave 2, #02-25",100,5,1997-05-05,Sales,"Feb, Apr, Jun, Aug, Oct, Dec"
Carl Kurz,95352563,[email protected],wall street,1000000000000,500000,1991-12-31,Executive,"Apr, Jun, Aug, Dec"
Daniel Meier,87652533,[email protected],10th street,23232323232,19191919,1969-07-27,Marketing,"Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec"
Elle Meyer,9482224,[email protected],michegan ave,3000,200,1999-06-17,HR,Dec
Fiona Kunz,9482427,[email protected],little tokyo,100000,1,2002-02-27,Finance,Jul
George Best,9482442,[email protected],4th street,10000,5000,2005-09-30,Engineering,"Jan, Feb, Mar, Apr, May, Jun"
38 changes: 38 additions & 0 deletions docs/diagrams/LeaveCommandSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":LeaveCommandParser" as LeaveCommandParser LOGIC_COLOR
participant ":LeaveCommand" as LeaveCommand LOGIC_COLOR
end box

[-> LogicManager : execute(leave 1 m/3)
activate LogicManager

LogicManager -> AddressBookParser : parseCommand(leave 1 m/3)
activate AddressBookParser

create LeaveCommandParser
AddressBookParser -> LeaveCommandParser : parse( 1 m/3)
activate LeaveCommandParser

create LeaveCommand
LeaveCommandParser -> LeaveCommand : LeaveCommand(index, month)
activate LeaveCommand

LeaveCommand --> LeaveCommandParser
deactivate LeaveCommand

LeaveCommandParser --> AddressBookParser : LeaveCommand
deactivate LeaveCommandParser

AddressBookParser --> LogicManager : LeaveCommand
deactivate AddressBookParser

LogicManager -->[ : CommandResult
deactivate LogicManager

@enduml
49 changes: 49 additions & 0 deletions docs/diagrams/ListCommandSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":ListCommandParser" as ListCommandParser LOGIC_COLOR
participant ":ListCommand" as ListCommand LOGIC_COLOR
end box

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

[-> LogicManager : execute(list d/engineering)
activate LogicManager

LogicManager -> AddressBookParser : parseCommand(list d/engineering)
activate AddressBookParser

create ListCommandParser
AddressBookParser -> ListCommandParser : parse(d/engineering)
activate ListCommandParser

create MatchingDepartmentPredicate
ListCommandParser -> MatchingDepartmentPredicate : ListCommand(predicate)
activate MatchingDepartmentPredicate

MatchingDepartmentPredicate --> ListCommandParser
deactivate MatchingDepartmentPredicate

create ListCommand
ListCommandParser -> ListCommand : ListCommand(predicate)
activate ListCommand

ListCommand --> ListCommandParser
deactivate ListCommand

ListCommandParser --> AddressBookParser : ListCommand
deactivate ListCommandParser

AddressBookParser --> LogicManager : ListCommand
deactivate AddressBookParser

LogicManager -->[ : CommandResult
deactivate LogicManager

@enduml
45 changes: 45 additions & 0 deletions docs/diagrams/ThemeCommandSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box UI UI_COLOR_T1
participant ":MainWindow" as MainWindow UI_COLOR
end box

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":ThemeCommandParser" as ThemeCommandParser LOGIC_COLOR
participant ":ThemeCommand" as ThemeCommand LOGIC_COLOR
end box

activate MainWindow
MainWindow-> LogicManager : executeCommand(theme light)
activate LogicManager

LogicManager -> AddressBookParser : parseCommand(theme light)
activate AddressBookParser

create ThemeCommandParser
AddressBookParser -> ThemeCommandParser : parse( light)
activate ThemeCommandParser

create ThemeCommand
ThemeCommandParser -> ThemeCommand : ThemeCommand(LightTheme.css)
activate ThemeCommand

ThemeCommand --> ThemeCommandParser
deactivate ThemeCommand

ThemeCommandParser --> AddressBookParser : ThemeCommand
deactivate ThemeCommandParser

AddressBookParser --> LogicManager : ThemeCommand
deactivate AddressBookParser

LogicManager --> MainWindow : CommandResult
deactivate LogicManager

MainWindow -> MainWindow : setTheme(LightTheme.css)

@enduml
57 changes: 57 additions & 0 deletions docs/diagrams/ViewLeaveCommandSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":ViewLeaveCommandParser" as ViewLeaveCommandParser LOGIC_COLOR
participant ":ViewLeaveCommand" as ViewLeaveCommand LOGIC_COLOR
end box

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

[-> LogicManager : execute(view_leave d/engineering)
activate LogicManager

LogicManager -> AddressBookParser : parseCommand(view_leave d/engineering)
activate AddressBookParser

create ViewLeaveCommandParser
AddressBookParser -> ViewLeaveCommandParser : parse(d/engineering)
activate ViewLeaveCommandParser

create HasLeaveAnyMonthPredicate
ViewLeaveCommandParser -> HasLeaveAnyMonthPredicate : new HasLeaveAnyMonthPredicate()
activate HasLeaveAnyMonthPredicate

create MatchingDepartmentPredicate
HasLeaveAnyMonthPredicate -> MatchingDepartmentPredicate : or(new MatchingDepartmentPredicate(Engineering))
activate MatchingDepartmentPredicate

MatchingDepartmentPredicate --> HasLeaveAnyMonthPredicate : combinedPredicate
deactivate MatchingDepartmentPredicate

HasLeaveAnyMonthPredicate --> ViewLeaveCommandParser
deactivate HasLeaveAnyMonthPredicate

create ViewLeaveCommand
ViewLeaveCommandParser -> ViewLeaveCommand : ViewLeaveCommand(combinedPredicate)
activate ViewLeaveCommand

ViewLeaveCommand --> ViewLeaveCommandParser
deactivate ViewLeaveCommand

ViewLeaveCommandParser --> AddressBookParser : ViewLeaveCommand
deactivate ViewLeaveCommandParser

AddressBookParser --> LogicManager : ViewLeaveCommand
deactivate AddressBookParser

LogicManager -->[ : CommandResult
deactivate LogicManager

@enduml
Binary file added docs/images/LeaveCommandSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/ListCommandSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/ThemeCommandSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/ViewLeaveCommandSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/
public class ViewLeaveCommand extends Command {


public static final String COMMAND_WORD = "view_leave";

public static final String MESSAGE = Messages.MESSAGE_VIEW_LEAVE_SUCCESS;
Expand Down

0 comments on commit 9357e67

Please sign in to comment.