ooad lecture 1 by craige larman

Upload: gta

Post on 07-Jul-2018

230 views

Category:

Documents


1 download

TRANSCRIPT

  • 8/19/2019 OOAD Lecture 1 by craige larman

    1/18

    Introduction to OOAD

    Lecture # 1

  • 8/19/2019 OOAD Lecture 1 by craige larman

    2/18

    OO Objectives

    We want a development method which:Is able to guide us through analysis design

    and implementation using one consistent

    paradigm throughout those phasesIs less li!ely to generate errors

    "acilitates reuse o designs and code

  • 8/19/2019 OOAD Lecture 1 by craige larman

    3/18

     Analysis $ Design

     AnalysisInvestigation o problem and requirements

    rather than a solution%

    &%g% 'e(uirements analysis and OO analysis%

    DesignIt emphasi)es a conceptual solution that ulills

    the re(uirements%&%g% Database design or OO design

    Implementation e*presses the true and completereali)ed design

  • 8/19/2019 OOAD Lecture 1 by craige larman

    4/18

    Object Oriented Analysis +OOA,

    OOA is -a method o analysis that

    examines requirements rom the

    perspectives o the classes and objects%.

    +/ooch 100,

    &mphasis is on inding and describing

    conceptual objects in the problem

    domain%

  • 8/19/2019 OOAD Lecture 1 by craige larman

    5/18

    Object Oriented Design +OOD,

    OOD is -a method o design

    encompassing the process o OO

    decomposition and a notation or depicting

    both logical and physical as well as static and dynamic models o the system%.

    +/ooch 100,

    &mphasis is on defining softwareobjects and how they collaborate to ulill

    system re(uirements

  • 8/19/2019 OOAD Lecture 1 by craige larman

    6/18

    What is OO analysis and design2

    &ssence o OO analysis 3 consider a

    problem domain rom the perspective o

    objects +real world things concepts,

    &ssence o OO design 3 define the

    solution as a collection o sotware

    objects +allocating responsibilities to

    objects,

  • 8/19/2019 OOAD Lecture 1 by craige larman

    7/18

    &*amples3 Library I4

    OO Analysis 3 in the case o the library

    inormation systems one would find 

    concepts li!e book, library, patron

    OO Design 3 emphasis on deining the

    software objects5 ultimately these objects

    are implemented in some programming

    language5 Book  may have a methodnamed print.

  • 8/19/2019 OOAD Lecture 1 by craige larman

    8/18

    &*ample 3 contd%

    Book

    title

    public class Book{

    private String title;

    public Chapter getChapter(int) {...}}

    domain concept visualization ofdomain concept

    representation in anobject-orientedprogramming language

  • 8/19/2019 OOAD Lecture 1 by craige larman

    9/18

    "light I4

    Plane

    tailNumber

    public class Plane{

    private String tailNumber;

    public List getFlightHistory() {...}}

    domain concept

    visualization ofdomain concept

    representation in anobject-orientedprogramming language

  • 8/19/2019 OOAD Lecture 1 by craige larman

    10/18

  • 8/19/2019 OOAD Lecture 1 by craige larman

    11/18

    /usiness processes 3 contd%

    Identiying and recording the business processes

    as use cases is not actually an object oriented

    activity5 though a necessary irst step%

  • 8/19/2019 OOAD Lecture 1 by craige larman

    12/18

    'oles in the organi)ation

    Identify the roles of people who will be

    involved in the business processes

    In OO terms - domain analysis

    &*amples 3 customer library assistantprogrammer navigator sensor etc%

  • 8/19/2019 OOAD Lecture 1 by craige larman

    13/18

    Who does what2

    Business processes and roles +actors,5

    time to determine how to ulill the

    processes and who does these processes

    in OO terms - object oriented design5

    assigning responsibilities to the various

    sotware objects

    oten e*pressed in class diagrams

  • 8/19/2019 OOAD Lecture 1 by craige larman

    14/18

    In 4ummary%%%

  • 8/19/2019 OOAD Lecture 1 by craige larman

    15/18

    4imple e*ample to see big picture

    Deine use cases

    Deine domain model

    Deine interaction diagrams

    Deine design class diagrams

    Define domain

    model

    Define

    Interaction

    diagrams

    Define design

    class diagramsDefine use

    cases

  • 8/19/2019 OOAD Lecture 1 by craige larman

    16/18

    4hort &*ample

    Dice game A sotware simulates a player rolling two dice% I

    the total is seven they win5 otherwise they

    lose%

  • 8/19/2019 OOAD Lecture 1 by craige larman

    17/18

    Deine use cases

    Use cases 

    8arrative descriptions o domain processes in a

    structured prose ormat

    9hey are stories or scenarios o how people use

    the system

    Use case: Play a game

    Actors: Player 

    Description: Player requests to roll the dice. System

     presents results: If the dice face value totals seven,

     player wins; otherwise, player loses.

  • 8/19/2019 OOAD Lecture 1 by craige larman

    18/18

    Deine conceptual model

    OO Analysis concernsspeciication o the problem domain

    identiication o concepts +objects,

    Decomposition o the problem domainincludes identiication o objects attributes associations

    results can be e*pressed in conceptual

    model