This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help plz

 
Vijayakumar Ramakrishnan
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
The answers given are 4 & 5.Why not 3..i dont understand why 4 is the answer.
Vandanam,
vijay
6). Which two demonstrate a "has a" relationship? (Choose two.)
1.public interface Person{ }
public class Employee extends Person{ }
2.public interface Shape{ }
public interface Rectangle extends Shape{ }
3.public interface Colorable{ }
public class Shape implements Colorable{ }
4.public class Species{ }
public class Animal{private Species species;}
5.interface Component{ }
class Container implements Component{
private Component[] children;
}
 
vadiraj vd
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

3.public interface Colorable{ }
public class Shape implements Colorable{ }
4.public class Species{ }
public class Animal{private Species species;}
5.interface Component{ }
class Container implements Component{
private Component[] children;
}

Hi Vijay,
In 3 there's "is a" relationship : Shape is a Colorable.
In 4 there's "has a" relationship : Animal has a Speices, although meaning-less.
Hope this helps,

------------------
Regards
---------
vadiraj

*****************
There's a lot of I in J.
*****************
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic