1-7 - Problem Solving with Computers-II CS 24 January 7,...

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

View Full Document Right Arrow Icon
Problem Solving with Computers-II CS 24 January 7, 2010
Background image of page 1

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

View Full DocumentRight Arrow Icon
Announcements Feedback from lab sections Textbook Lecture notes available online Username: ucsb-cs24 Password: w10-cs24
Background image of page 2
Lecture outline Software engineering principles Brief introduction to classes ADT
Background image of page 3

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

View Full DocumentRight Arrow Icon
Procedural vs. Object-Oriented Code “Read the specification of the software you want to build. Underline the verbs if you are after procedural code, the nouns if you aim for an object-oriented program .” Grady Booch, “What is and Isn’t Object Oriented Design,” 1989.
Background image of page 4
Two Approaches to Building Manageable Modules Divides the problem into more easily handled subtasks, until the functional modules (subproblems) can be coded. Identifies various objects composed of data and operations, that can be used together to solve the problem. FUNCTIONAL DECOMPOSITIO N OBJECT-ORIENTED DESIGN FOCUS ON: processes FOCUS ON: data objects
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 A General Example of Functional Decomposition Planning a large party
Background image of page 6
Functional Design Modules Find Weighted Average Print Weighted Average Main Print Data Print Heading Get Data Prepare File for Reading
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 Object-Oriented Design A problem-solving methodology that produces a solution to a problem in terms of self-contained entities called objects Object A thing or entity that makes sense within the context of the problem For example, a student , a car , time , date
Background image of page 8
Object-Oriented Design A technique for developing a program in which the solution is expressed in terms of objects -- self- contained entities composed of data and operations on that data. Private data m1 m2 . . . m3
Background image of page 9

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

View Full DocumentRight Arrow Icon
10 World View of OOD Problems are solved by isolating the objects in a problem, determining their properties and actions (responsibilities) , and letting the objects collaborate to solve a problem
Background image of page 10
11 Object-Oriented Design An analogy: You and your friend fix dinner Objects : you, friend, dinner Class : you and friend are people People have name, eye color, … People can shop, cook, … Instance of a class : you and friend are instances of class People, you each have your own name and eye color, you each can shop and cook You collaborate to fix dinner
Background image of page 11

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

View Full DocumentRight Arrow Icon
12 Object-Oriented Design Class (or object class) A description of a group of objects with similar properties and behaviors; a pattern for creating individual objects Object ( instance of a class) A concrete example of the class Classes contain fields that represent the properties (name, eye color) and behaviors (responsibilities) (shop, cook) of the class Method A named algorithm that defines behavior (shop, cook)
Background image of page 12
13 Verification of Software Program verification The process of determining the degree to which a software project fulfills its specifications Program validation the process of determining the degree to which software fulfills its intended purpose
Background image of page 13

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

View Full DocumentRight Arrow Icon
Verification vs. Validation Program verification asks, “Are we doing the job right?” Program validation asks,
Background image of page 14
Image of page 15
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/20/2010 for the course CS 24 taught by Professor Singh during the Winter '10 term at UCSB.

Page1 / 47

1-7 - Problem Solving with Computers-II CS 24 January 7,...

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

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