Java View all facts Glossary Help |
| principle > is-a versus has-a principle |
| is-a versus has-a principle | ||||
| subject | fact | |||
| is-a versus has-a principle | is a subtopic of Classes | ![]() |
| is a subtopic of Inheritance | ![]() | |
| is a kind of principle | ![]() | |
| states that if you find yourself using the phrase "an X is a Y" when describing the relation between two classes, then the first class is a subclass of the second; if you find yourself using "X has a Y", then instance of the second class appear as parts of instances of the first class | ![]() |