



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Professor: Bellaachia; Class: Software Paradigms; Subject: Computer Science; University: George Washington University; Term: Unknown 2006;
Typology: Study notes
1 / 7
This page cannot be seen from the preview
Don't miss anything!




units?
program units (Dealing with programming in the small).
applications (programming in the large)? Mechanisms for multiple logical units Multiple programmers, and Translating design into implementation.
programs do not scale up to solve large problems
Abstraction o Allows us to concentrate on the major, important aspects of the problem, and leave the details for later o During problem analysis, we discover and invent abstractions that allow us to understand the problem Modularity o Allows us to build programming pieces that can be assembled to construct larger programs
The implementation can change without affecting the clients
building modules Class: C++, Java Package: Ada, Modula- Module: C, Pascal
A module is a server or service provider and the caller is the client.
A unit is said to encapsulate the service Combine program components that are necessary to provide the service Only make those aspects visible to clients that are required Language mechanisms provide a means for information hiding
The interface describes what services are exported by the module, and imported by the client
The implementation describes the module’s internal structure that provide the service
Clients may store and retrieve pairs of the form <name, id> Operations include o Inserting a pair <"Pat", 23> o Retrieving elements by supplying the string component "Pat" o Deleting a pair based on a string Encapsulation helps to hide the implementation (array, linked list, etc.) Language Example: Built-in Types: o How float type is implemented Java: o How vector or set data types are implemented?
In order to use a module, we only need its interface and not its internal implementation. This clean separation contributes to the independence of the module.
Unit of compilation Order of compilation Amount of inter-module checking
To control the complexity of very large programs, libraries were introduced Common modules that are used by many other modules can be grouped into standard libraries –Avoid name clashes Avoid the need to recompile when an unused part of a library changes