Programming III 12.5.2003

    Each question is worth 6 points

  1. Explain what is the Dependency Inversion Principle (DIP). Give a simple example illustrating this principle in (use UML class diagram notation). Explain further what is the rational behind this strategy in design? Why this principle is called "inversion"? What are the consequenses of violating this principle?

  2. What is callback. Why and where callbacks are used? Show how callback mechanism can be implemented in an object oriented language?

  3. Adapter, Facade and Proxy are three related structural patterns that are used for interfacing software modules. Present the three patterns briefly. The reasons for applying these patterns are different - explain the situations where each of these is applied (i.e. the context and the problem that is solved with the pattern).

  4. Frameworks
    a) Explain the basic principles of process of designing and application framework.
    b) Explain the following framework-related concepts:
    1. Specialization interface
    2. White-box and black-box framwork
    3. Layered framework

  5. There are many different definitions for a component in the literature. Clearly the term "component" is in danger of becoming to mean almost anything - objects, classes, source libraries, binary modules, run-time plug-in modules... Try to clarify the concept of a software component by discussing different aspects of components, e.g. time of deployment, size, component interfaces, degree of independence of the component, customizability and the mechanism of customizing the compontn. How does each of these aspects affect the reusability of the component?