lecture12 info hiding and sware reuse

lecture12 info hiding and sware reuse - Information Hiding...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Information Hiding
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Introduction of Information Hiding (1/2) David Parnas first introduced the concept of information hiding around 1972 He argued that the primary criteria for system modularization should concern the hiding of critical design decisions He stressed hiding “ difficult design decisions or design decisions which are likely to change
Background image of page 2
Introduction of Information Hiding (2/2) The principle of information hiding is the hiding of design decisions in a program that are most likely to change, thus protecting other parts of the program from change if the design decision is changed The protection involves providing a stable interface which shields the remainder of the program from the implementation (the details that are most likely to change) Advantage Information hiding isolates clients from requiring intimate knowledge of the design to use a module, and from the effects of changing those decisions Information hiding is a powerful programming technique because it reduces complexity Information hiding is also used to prevent programmers from changing – intentionally or unintentionally – parts of a program One of the chief mechanisms for hiding information is encapsulation combining elements to create a larger entity
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Encapsulation The term encapsulation is often used interchangeably with information hiding, while some make distinctions between the two Information hiding can be considered as the principle and encapsulation can be considered as the technique A software module hides information by encapsulating the information into a module or other construct which presents an interface
Background image of page 4
In Object-Oriented Programming Information hiding reduces software development risk by shifting the code's dependency on an uncertain implementation (design decision) onto a well-defined interface Clients of the interface perform operations purely through the interface so if the implementation changes, the clients do not have to change
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example The most common use of information hiding is to hide the physical storage layout for data so that if the physical storage layout is changed, the change is restricted to a small subset of the total program For example, if a three-dimensional point (
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 24

lecture12 info hiding and sware reuse - Information Hiding...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online