Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding: "is A" And "has A" Relationship

 
Thennam Pandian
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have seen a class has "is a" and "has a" relationship with one class. Is that a correct design? If it is correct, let me know the advantage of that design? On what scenario, we need to use this design?

The skeleton of the code :



 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the subject line, what does "Reg" mean?

Object-oriented designs should be based on domain/business requirements. In order to judge if a design is "efficient" or "not efficient", one would need to first read and understand the requirements. In software design there never is "correct" or "incorrect", as there are always many different styles and techniques which can be used to implement a particular requirement.
 
Thennam Pandian
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for your reply.

Reg in subject line means "Regarding".
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for explaining what you intended "Reg" to mean in your subject line.

Note , "Reg" is not an English word and your personal shorthand may not be understood. It is better to write with
real words instead of assuming that personal shorthand is understandable.
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moderator adapted title.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic