forked from nus-cs2113-AY2324S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #167 from lckjosh/master
Add Command class diagram
- Loading branch information
Showing
4 changed files
with
96 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
@startuml | ||
!include style.puml | ||
left to right direction | ||
hide circle | ||
skinparam classAttributeIconSize 0 | ||
|
||
Package Commands as CommandPackage <<Rectangle>>{ | ||
class HelpCommand { | ||
+ void execute(TransactionList) | ||
} | ||
class AddCommand { | ||
- Transaction transaction | ||
+ void execute(TransactionList) | ||
} | ||
class ListOfCommands { | ||
+ {static} String COMMAND_EXIT | ||
+ {static} String COMMAND_LIST | ||
+ {static} String COMMAND_ALLOWANCE | ||
+ {static} String COMMAND_EXPENSE | ||
+ {static} String COMMAND_DELETE | ||
+ {static} String COMMAND_FIND | ||
+ {static} String COMMAND_VIEW | ||
+ {static} String COMMAND_FILTER | ||
+ {static} String COMMAND_EDIT | ||
+ {static} String COMMAND_BUDGET | ||
+ {static} String COMMAND_HELP | ||
} | ||
class DeleteCommand { | ||
- int taskIndex | ||
+ void execute(TransactionList) | ||
} | ||
class InvalidCommand { | ||
+ void execute(TransactionList) | ||
} | ||
class FilterCommand { | ||
- TransactionCategory category | ||
+ void execute(TransactionList) | ||
} | ||
class ExitCommand { | ||
+ void execute(TransactionList) | ||
+ {static} boolean isExit(Command) | ||
} | ||
class ViewCommand { | ||
- int taskIndex | ||
+ void execute(TransactionList) | ||
} | ||
class ListCommand { | ||
+ void execute(TransactionList) | ||
} | ||
class EditCommand { | ||
- int index | ||
- Transaction transaction | ||
+ void execute(TransactionList) | ||
} | ||
abstract class Command { | ||
+ {abstract}void execute(TransactionList) | ||
} | ||
class BudgetCommand { | ||
- float budget | ||
+ void execute(TransactionList) | ||
} | ||
|
||
|
||
Command <|-u- HelpCommand | ||
Command <|-u- AddCommand | ||
Command <|-u- DeleteCommand | ||
Command <|-u- InvalidCommand | ||
Command <|-l- FilterCommand | ||
Command <|-- ExitCommand | ||
Command <|- ViewCommand | ||
Command <|-- ListCommand | ||
Command <|-- EditCommand | ||
Command <|-- BudgetCommand | ||
} | ||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.