Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help

 
feng lee
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where will be a 'is a ' relationship will occur select one?
A. interface Person
class Employee implements Person
B. interface Shape
interface Rectangle extends Shape
C. interface Component
class Objects implement Component
{Component [] Component;}
Ans:B
I think A is also right,isn't it?
 
Don Bosco
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right!
 
Claire Yang
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, if "class A extends B implements C" then we say that A "is a" B and A "is a" C also?
 
Dan Chisholm
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Claire Yang:
So, if "class A extends B implements C" then we say that A "is a" B and A "is a" C also?

Yes.
 
Terry Kwan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why C is wrong?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic