

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: Padua-Perez; Class: OBJECT-ORIENTED PROG II; Subject: Computer Science; University: University of Maryland; Term: Unknown 1989;
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Obstacles
How to divide work Interface & conditions
Create complete, accurate, and unambiguous statement of problem to be solved
Description may not be accurate Description may change over time Difficult to specify behavior for all inputs Natural language description is imprecise Formal specification languages limited and difficult to understand
Specification of input & output for program
Problem not understood by customer
Customer changes their mind
Usually only covers common cases Hard to consider all inputs (may be impossible) Example Most UNIX utilities crash with random inputs
Natural language description is imprecise Why lawyers use legalese for contracts Formal specification languages are limited and may be difficult to understand Examples Find sum of all values in N-element list L between 1 and 100
Difficult to write specifications that are both readable and precise
i = 0
N-
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
Design – How To Divide Work
Break large problem into many smaller problems Cannot solve large problems directly Divide and conquer
Design – How To Divide Work
Treat problem as a collection of functions
Top-down design Successively split problem into smaller problems Bottom-up design Start from small tasks and combine
Design – Decomposition Example
Design – How To Divide Work
Treat problem as a collection of data objects Objects Entities that exist in problem Contain data Perform actions associated with data
Design – Comparison Example
Functional programming Arrivals, departures, transactions
Object-oriented programming Customers, lines, tellers, transactions