An Engineering Interlude - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

An Engineering Interlude

Description:

Designers use UML to communicate their instructions to those who will do the coding ... Choices are displayed, menu fashion, on the screen. ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 16
Provided by: paulde8
Category:

less

Transcript and Presenter's Notes

Title: An Engineering Interlude


1
An Engineering Interlude
2
Santa Maria Del Fiore
  • Designed by Fillipo Bruneleschi
  • The marble slab inside reads
  • Corpus Magni Ingenii Viri Philippi Brunelleschi
    Fiorentini
  • (Body of the great and clever man Filippo
    Brunelleschi of Florence)

3
  • Ingenere is the Italian word for engineer
  • Genius, ingenius, and ingenere clearly all have
    the same Latin root
  • Builders of machines were clever
  • In fact, Brunelleschi was awarded the dome
    contract but refused to divulge the design
  • Typical of his day architecture was an exercise
    in cleverness

4
  • How does a profession differ from a craft?
  • Substitution of standard techniques for
    cleverness
  • Licensing
  • Self-regulating professional bodies
  • Government regulation
  • Threat of litigation

5
  • Software Design
  • Still in the craft (clever) stage

6
Issues
  • Not good enough for a program to run
  • It must
  • Be maintainable
  • Communicate with other programs

7
Software Development
  • Assess client needs.
  • Develop conceptual documentation
  • Show to client. If not OK, go to step 1
  • Build prototypes.
  • Show to client. If not OK, go to step 1
  • System design
  • Program
  • Test Components. If not OK, go to step 7
  • Integrate Components.
  • Test Integration. If not OK, go to step 6.

8
Object-Oriented Design
  • Goals
  • Manage Complexity
  • Promote software reuse
  • Tools
  • Data hiding
  • Inheritance
  • Composition
  • Polymorphism

9
A Quick How-To
  • Object-Oriented Analysis
  • Statement of what our client wants
  • Object-Oriented Design
  • How to provide it using OO tools

10
Tasks
  • Provide a problem statement (requirements
    analysis)
  • Multiple discussions with client
  • Determine objects needed to implement the system
  • Look for nouns in problem statement
  • Determine object attributes
  • What do I know?
  • How are the nouns described?
  • These become the class variables
  • Determine object behaviors
  • What can I do?
  • Look for verbs in problem statement
  • These become the class methods

11
Key Rule
  • Information Hiding
  • Though objects know how to communicate with one
    another across well-defined interfaces, objects
    are normally not allowed to know how other
    objects are implemented

12
Unified Modeling Language
  • OOD Tool
  • We use C to communicate our instructions to a
    computer
  • Designers use UML to communicate their
    instructions to those who will do the coding
  • Important names
  • Grady Booch
  • James Rumbaugh
  • Ivar Jacobsen
  • All worked at Rational Software in the late 90s
  • Adopted by the Object Management Group
    (www.omg.org) in 1997.
  • OMG is a non-profit organization that promotes
    the development of standards in OO technology.
  • OMG now has responsibility for maintaining the
    notation.
  • UML 2.0 is the current version

13
Sample Problem
  • Develop software to perform ATM transactions.
    The software should model the functions of all
    hardware associated with an ATM, but not be
    concerned with how the hardware works. The ATM
    must authenticate a user and then perform a
    number of transactions. The user enters security
    a five digit account number through a numeric
    keypad. Choices are displayed, menu fashion, on
    the screen. The user enters the choice (balance,
    withdraw, deposit, exit) using the numeric
    keypad. The machine has a cash dispenser that
    dispenses bills in multiples of 20. The deposit
    slot receives deposit envelopes. If the user
    chooses to withdraw, he/she is presented with a
    screen indicating valid withdrawal amounts menu
    fashion (20,40,60,100,200, Cancel).
  • There are several error conditions
  • Invalid account number
  • Invalid transaction choice
  • Invalid withdrawal choice
  • Withdrawal amount exceeds balance
  • In case of error, the user receives an
    appropriate message and is invited to try again
    or quit.

14
Class Diagram
15
Class Diagram with Attributes and Methods
Write a Comment
User Comments (0)
About PowerShow.com