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?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
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?
Last edited by tripline; November 26th, 2011 at 01:03 AM.
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