

















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
An overview of problem specification and software architecture in object-oriented programming ii. It discusses the importance of creating accurate and unambiguous problem statements, the challenges of writing precise specifications, and the benefits and drawbacks of different software architectures. The document also includes examples and critiques of various solutions.
Typology: Study notes
1 / 25
This page cannot be seen from the preview
Don't miss anything!


















Overview
Obstacles
How to divide work Interface & conditions
Problem Specification
Specification of input & output for program
Problem Specification Problems
Problem not understood by customer
Customer changes their mind
Usually only covers common cases Hard to consider all inputs (may be impossible) Most UNIX utilities used to crash with random inputs An Empirical Study of the Reliability of UNIX Utilities, B.P. Miller, L. Fredriksen, and B. So, 1991
Searching for an element
a is an array of n integers, index 0..n- 1 x is an integer
if result == - 1, there is no value i such that a[i] == x else, a[result] == x
Implementation 1
a is an array of n integers, index 0..n- 1 x is an integer
if result == - 1, there is no value i such that a[i] == x else, a[result] == x
Program Design
Break software into integrated set of components that work together to solve problem specification
Methods for decomposing problem How to divide work What work to divide How components work together
Software Architecture
Software Productivity Improvements
On the Criteria To Be Used in Decomposing Systems into Modules, David Parnes, 1972
Bill Pugh
Modularization
reads input and stores the lines
Prepares index with one entry per shifted line
Produces a sorted index
Produces a formatted output
Commentary Using this solution data can be represented efficiently, since computations can share the same storage. The solution also has a certain intuitive appeal, since distinct computational aspects are isolated in different modules. However, as Parnas argues, it has a number of serious drawbacks in terms of its ability to handle changes. In particular, a change in data storage format will affect almost all of the modules. Similarly changes in the overall processing algorithm and enhancements to system function are not easily accommodated. Finally, this decomposition is not particularly supportive of reuse. An Introduction to Software Architecture, David Garlan and Mary Shaw
Kwic architecture, pipes and filters
Different architecture styles
Pipes and filters What is the data, and what components do they move through Blackboard Components communicate through a shared, updatable blackboard
Compiler Architecture