Poker UML AND ADT DESIGN PLAN Object Oriented
Poker UML AND ADT DESIGN PLAN Object Oriented Programming 31695 - Poker Project 1
AGENDA n Please describe here how you design plan goes n You need to draw a full class diagram of your OOA design n For each class you need to describe a short ADT specification Object Oriented Programming 31695 - Poker Project 2
Blackjack Class Diagram (EXAMPLE) 1 name budget hand state strategy deck shuffle() Game dealer players log open() close() run() history() is_finished() 1 Deck cards shuffle() draw_card() 0. . 52 Card rank suit value() 0. . 52 Player 2. . 6 log 1 string Dealer 1 state name budget hand state strategy hit() stand() 0. . 1 Hand cards soft add(card) value() Of course, you have to do a similar Diagram for Poker … Object Oriented Programming 31695 - Poker Project 3
Stack: Abstract Data Type Interface Ex Lo amp Create a new empty stack ok le s l of s. push(item) ike ho ! w Add an item to the top of the stack n s = Stack() n n s. pop() Pop an item from the top of the stack Constructor Mutator an AD T n s. peek() Mutator Accessor Return the item to the top of the stack (don’t pop it!) Return None if stack is empty (this is not a good idea, why? Issue error? ) n s. size() Accessor Return the number of items in the stack n s. is_empty() Accessor Return True if stack is empty, False if stack is non-empty Object Oriented Programming 31695 - Poker Project 4
Resources for further study n http: //edn. embarcadero. com/article/31863 n http: //en. wikipedia. org/wiki/Class_diagram n http: //en. wikipedia. org/wiki/Unified_Modeling_Language n http: //en. wikipedia. org/wiki/List_of_UML_tools Object Oriented Programming 31695 - Poker Project 5
You can use the following symbols for drawing your Class diagrams Dealer name budget hand state strategy deck shuffle() Hand cards soft add(card) value() Card Deck rank suit value() cards shuffle() draw_card() Game Player name budget hand state strategy hit() stand() Object Oriented Programming 31695 - Poker Project dealer players log open() close() run() history() is_finished() 6
Game Dealer Game Player Deck Card Game string Player Hand Player Object Oriented Programming 31695 - Poker Project Hand Card string 7
- Slides: 7