Teach me about inheritance and extends?

• November 25th, 2011, 11:05 PM
tripline
Teach me about inheritance and extends?
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?
• November 26th, 2011, 06:32 AM
Norm
Re: Teach me about inheritance and extends?
• November 26th, 2011, 01:13 PM
tripline
Re: Teach me about inheritance and extends?
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?
• November 26th, 2011, 02:06 PM
Norm
Re: Teach me about inheritance and extends?
What do your lessons and text book say?

Can you write a simple program to show the problem you are having?
• November 26th, 2011, 03:18 PM
tripline
Re: Teach me about inheritance and extends?
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?
• November 26th, 2011, 03:21 PM
Norm
Re: Teach me about inheritance and extends?
This is OOP theory. You'll get better answers for these questions from your textbooks or tutorials.
• November 26th, 2011, 03:23 PM
tripline
Re: Teach me about inheritance and extends?
What does OOP stand for?
• November 26th, 2011, 03:24 PM
Norm
Re: Teach me about inheritance and extends?
Is Google working where you are connected to the internet?
Give it a try