How does
x is-a y
x has-a y
x wants-a y
work?
When do you use has-s in regards to X inherits Y, Y has a X or something like that?
Printable View
How does
x is-a y
x has-a y
x wants-a y
work?
When do you use has-s in regards to X inherits Y, Y has a X or something like that?
Take a look at these tutorials:
The Java™ Tutorials
The Really Big Index
Trail: Learning the Java Language: Table of Contents (The Java™ Tutorials)
I need a little bit of help with contain.
If x is-a y x inherits from y, but does this mean y contain x as well?
What do your lessons and text book say?
Can you write a simple program to show the problem you are having?
Not a program just logic. For example
X inherit y =x is a y
how do i use this logic when it deals with has-a?
x inherit y = y has a x? Is that how it works?
And how would you use contain in an = expression?
This is OOP theory. You'll get better answers for these questions from your textbooks or tutorials.
What does OOP stand for?
Is Google working where you are connected to the internet?
Give it a try