Skip to content

Commit

Permalink
docs: クラス図の更新
Browse files Browse the repository at this point in the history
  • Loading branch information
k2works committed Dec 14, 2019
1 parent ab205e6 commit 9b0d17b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/page/lib/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if (spec) {
## ToDoリスト
- [x] statementメソッドの分割、再配置
- [x] 料金計算の条件式をポリモーフィズムに置き換える
- [ ] Template Methodの形成
- [x] Template Methodの形成
`
)
}
36 changes: 28 additions & 8 deletions src/page/lib/pluntuml.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,31 @@ class Customer {
_getTotalCharge()
_getTotalFrequentRenterPoints()
}
class Statement {
value(Customer)
headerString(Customer)
eachRentalString(Rental)
footerString(Customer)
}
class HtmlStatement {
headerString(Customer)
eachRentalString(Rental)
footerString(Customer)
}
class TextStatement {
headerString(Customer)
eachRentalString(Rental)
footerString(Customer)
}
Price <|-- ChildrensPrice
Price <|-- NewReleasePrice
Price <|-- RegularPrice
Price "1"<- Movie
Movie "1"<-"*" Rental
Rental "*"<-"1" Customer
Customer -> Statement
Statement <|-- HtmlStatement
Statement <|-- TextStatement
`;
compress(source, outputId);
})();
Expand All @@ -71,26 +90,27 @@ const sequencDiagram = (() => {
const source = `
-> aCustomer: statement
activate aCustomer
aCustomer -> aCustomer :getTotalCharge
activate aCustomer
aCustomer -> aRental :*[for all rentals] getCharge
aCustomer -> Statement :value
Statement -> Statement :getTotalCharge
activate Statement
Statement -> aRental :*[for all rentals] getCharge
activate aRental
aRental -> aMovie :getCharge
activate aMovie
aMovie -> aPrice :getCharge
deactivate aMovie
deactivate aRental
deactivate aCustomer
aCustomer -> aCustomer :getTotalFrequentRentalPoints
activate aCustomer
aCustomer -> aRental :*[for all rentals] getFrequentRenterPoints
deactivate Statement
Statement -> Statement :getTotalFrequentRentalPoints
activate Statement
Statement -> aRental :*[for all rentals] getFrequentRenterPoints
activate aRental
aRental -> aMovie :getFrequentRenterPoints
activate aMovie
aMovie -> aPrice :getFrequentRenterPoints
deactivate aMovie
deactivate aRental
deactivate aCustomer
deactivate Statement
deactivate aCustomer
`;
compress(source, outputId);
Expand Down

0 comments on commit 9b0d17b

Please sign in to comment.