23ProblemSpecificationDesignSEIII

23ProblemSpecificationDesignSEIII - CMSC 132:...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CMSC 132: Object-Oriented Programming II Problem Specification & Software Architecture Department of Computer Science University of Maryland, College Park Overview Problem specification Obstacles Software Architecture How to divide work Interface & conditions Problem Specification Goal Create complete, accurate, and unambiguous statement of problem to be solved Problems Often useful at the method or class level Perfection rarely applicable or available at the system level E.g., complete, accurate and unambiguous Problem Specification Example Specification of input & output for program Problem Specification Problems Description may not be accurate Problem not understood by customer Description may change over time Customer changes their mind Difficult to specify behavior for all inputs 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 Problem Specification Problems Description may be ambiguous 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 between 1 and 100 that occur in the set S Sum { x | x S 1 x 100 } Difficult to write specifications that are both readable and precise Searching for an element int search(int x, int a) Precondition: a is an array of n integers, index 0..n-1a is an array of n integers, index 0....
View Full Document

Page1 / 24

23ProblemSpecificationDesignSEIII - CMSC 132:...

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

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