mardi 2 août 2016

Design patten: Which UML relationship best describes this class?

Given the following class:

public class CardGame extends Game {
    private CardDeck[] cardDecks;
    public CardGame(int numCardDecks) {
        super();
        cardDecks = new CardDeck[numCardDecks];
        for (int i=0; i < numCardDecks; i ++) {
            cardDecks[i] = new CardDeck();
        }
    }
}

Which UML relationship best describes this class? And why? - Aggregation - Composition - Generalization - Factory

Aucun commentaire:

Enregistrer un commentaire