aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes A  exam sub. Can you help me? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "A  exam sub. Can you help me?" Watch "A  exam sub. Can you help me?" New topic
Author

A exam sub. Can you help me?

ge yinglong
Greenhorn

Joined: May 27, 2002
Posts: 3
Hi,my friend
Is it right?

70.Which two demonstrate an �is a � relationship?(choose two.)again 2
A.public interface Person {}
public class Employee extends Person{}
B.public interface Shape {}
public interface Rectangle extends shape{}
C.public interface Color {}
public class Shape { private Color color; }
D.public class Species {}
public class Animal { private Species species; }
E.interface Component {}
class container implements Component {
private Component[] children;
}
answer: A, D
geyinglong@etang.com


java my life.
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Answers are : B and E
Explanation:
A. public interface Person {}
public class Employee extends Person{}
FALSE - wrong declaration - class can implement interface, not extend
B. public interface Shape {}
public interface Rectangle extends shape{}
TRUE - Rectangle is a Shape
C. public interface Color {}
public class Shape { private Color color; }
FALSE - sample of "has a" relationship - "Shape has a Color"
D. public class Species {}
public class Animal { private Species species; }
FALSE - sample of "has a" relationship - "Animal has a Species"
E. interface Component {}
class container implements Component {
private Component[] children;
}
TRUE - Container is a Component.
BTW, there's a "has a" relationship,too - "Container has a Component"
I can suggest you RHE preparation book for this topic.
Jamal Hasanov
www.j-think.com
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

"geyl"
Welcome to the JavaRanch! Please adjust your displayed name to match the JavaRanch Naming Policy.
You can change it here.
Thanks! and again welcome to the JavaRanch!


- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
ge yinglong
Greenhorn

Joined: May 27, 2002
Posts: 3
Thanks a lot.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A exam sub. Can you help me?
 
Similar Threads
is a relationship
Sun sample ques.
Sun qstns - "has a" relationship
what is the " is a " relationship
is-a relationship