tut06_2009_sol - The class Deck is a...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
EE3206/EE5805 Java Programming & Application Tutorial 6 – Programming with UML Class Diagrams Q1. The class Card implements (realization) the interface Comparable and realize the abstract method compareTo which can used to compare two Card objects. The class CardCollection contains (composition) a group of cards which are hold in a scalable array. A number of methods are provided for manipulating the cards.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: The class Deck is a specialized (generalization) version of CardCollection . An object of deck can be shuffled. Users can also deal a card from the deck. The class Hand is also a specialized (generalization) version of CardCollection . Since Card is a kind of Comparable things, an object of hand can be sorted....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online