Re: encapsulation , data hiding
From: piyush (p77gin_at_gmail.com)
Date: 01/03/05
- Next message: frebe: "Re: Encapsulation vs separation of concerns"
- Previous message: Phlip: "Re: Static vs dynamic"
- Next in thread: Robert C. Martin: "Re: encapsulation , data hiding"
- Maybe reply: Robert C. Martin: "Re: encapsulation , data hiding"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 2 Jan 2005 20:26:38 -0800
in addition to what HS has posted, here's my 10 cents worth. :-)
what the interviewer was probably looking for was whether you know the
difference between theory and practical implementation. I generally
tend to view encapsulation as a theoretical concept which may be
defined as:
"encapsulation is the process of compartmentalizing the elements of an
abstraction that constitute its structure and behaviour; encapsulation
serves to separate the contractual interface of an abstraction and its
implementation."
The above is according to Booch and provides a rather comprehensive
definiton of the theoretical concept. OTOH, data hiding may be viewed
as the implementation aspect of encapsulation. In other words, we
achieve encapsulation via (by implementing) data hiding. Data hiding,
being what HS described in his post.
best,
-Piyush
- Next message: frebe: "Re: Encapsulation vs separation of concerns"
- Previous message: Phlip: "Re: Static vs dynamic"
- Next in thread: Robert C. Martin: "Re: encapsulation , data hiding"
- Maybe reply: Robert C. Martin: "Re: encapsulation , data hiding"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|