Question: A Deck is a group of cards and a Deck has a group of cards. In our example, its better to choose the is-a relationship

A Deck is a group of cards and a Deck has a group of cards. In our example, it’s better to choose the is-a relationship and implement inheritance. In this case, why is inheritance a better choice than composition?

Step by Step Solution

3.29 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Inheritance is better because with this example theres a seco... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction To Programming With Java A Problem Solving Approach Questions!