java-design-patterns/servant/etc/servant.urm.puml

56 lines
1.3 KiB
Plaintext
Raw Normal View History

2019-12-07 18:03:49 +02:00
@startuml
package com.iluwatar.servant {
class App {
- LOGGER : Logger {static}
- jenkins : Servant {static}
- travis : Servant {static}
+ App()
+ main(args : String[]) {static}
+ scenario(servant : Servant, compliment : int) {static}
}
class King {
- complimentReceived : boolean
- isDrunk : boolean
- isHappy : boolean
- isHungry : boolean
+ King()
+ changeMood()
+ getDrink()
+ getFed()
+ getMood() : boolean
+ receiveCompliments()
}
class Queen {
- complimentReceived : boolean
- isDrunk : boolean
- isFlirty : boolean
- isHappy : boolean
- isHungry : boolean
+ Queen()
+ changeMood()
+ getDrink()
+ getFed()
+ getMood() : boolean
+ receiveCompliments()
+ setFlirtiness(f : boolean)
}
~interface Royalty {
+ changeMood() {abstract}
+ getDrink() {abstract}
+ getFed() {abstract}
+ getMood() : boolean {abstract}
+ receiveCompliments() {abstract}
}
class Servant {
+ name : String
+ Servant(name : String)
+ checkIfYouWillBeHanged(tableGuests : List<Royalty>) : boolean
+ feed(r : Royalty)
+ giveCompliments(r : Royalty)
+ giveWine(r : Royalty)
}
}
App --> "-jenkins" Servant
King ..|> Royalty
Queen ..|> Royalty
@enduml