56 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			56 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 
								 | 
							
								@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
							 |