{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This 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
Image of page 1

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

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

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

View Full Document Right 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.
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
Image of page 5

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

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

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

View Full Document Right 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
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
Image of page 9

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

View Full Document Right 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
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
Image of page 11

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

View Full Document Right 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)
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
Image of page 13

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

View Full Document Right Arrow Icon
14 Verification vs. Validation Program verification asks, “Are we doing the job right?” Program validation asks, “Are we doing the right job?” B.W. Boehm, Software Engineering Economics, 1981
Image of page 14
Image of page 15
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern