Urn UML Diagrams

To Examples

UML Diagrams for Urn Class

 

Verson using traditional array

Urn

- balls: bool[ ]  
- _totalBalls : int
+ IsEmpty : bool int {read only}
+ TotalBalls : int {read only}

+ Urn(int) : int
+ Draw( ) : int
+ BallsRemaining( ) : int
+ ToString( ) : string

 

Version using ArrayList collection

Urn

- balls: ArrayList  
- _totalBalls : int
+ IsEmpty : bool int {read only}
+ TotalBalls : int {read only}

+ Urn(int) : int
+ Draw( ) : int
+ BallsRemaining( ) : int  
+ ToString( ) : string