0
public class Board extends JPanel implements ActionListener {
    private Card[] cardChecker = new Card[2];

... some code
}

For example class Board is declaring an array type of Card which is a class that I wrote. Is it Aggregation or Composition?

Ahmet Duser
  • 19
  • 1
  • 4
  • 3
    @Charlie, neither aggregation nor composition is related to inheritance. An array is one property in UML, usually drawn as an association end. – Jim L. May 17 '21 at 03:30
  • @JimL. You are correct, I was careless in my Googling. I have removed the comment to avoid confusion. – Charlie Armstrong May 18 '21 at 02:37

0 Answers0