Docstoc

conceptual_model

Document Sample
conceptual_model Powered By Docstoc
					Conceptual Model

Software Design 236700
Lecture #4 Dr. Uri Shani
 IBM and the Technion
             Build artifacts dependencies
                              Use cases:
Test cases                                       Use cases
               Windows &         real
                Reports
                                                 Use case
                                   Interaction   diagrams
                Methods
                                    diagrams
                                                 Conceptual
                                 Design class      model
                  Class &
                 Interface        diagrams
                definitions
                                                 Glossary

                               Architecture        System
                                Package           sequence
                                diagrams          diagrams


                                                 Operations
                                                 contracts
                                  Database
                 SQL
                                  schema
                                                    State
                                                  diagrams
Important Characteristics
• Deals with real world things, but not software components
  (yet)
• UML representation of static structure diagrams w/no
  operations
• Focus on domain concepts
   – Entities
   – Associations between entities
   – Attributes of concepts
• Decomposes the problem to comprehensible units
  (concepts)
• Clarifies the terminology of the domain
     Example
               Sales
               Lineitem               Records-sale-of         Item
   Concept
                                  0..1                    1
               quantity
                 1..*                                             *
                         Contained-in                                 Stocked-in
Association
                   1                                              1

               Sale               1                           Store
                                                              Address
   Attribute   Date; time                   Captured-on
                                                              name
                   1                                                  1
                        Paid-by                                        Houses
                   1                                                  1..*

               Payment                                    1   POST
               amount
More on what is a concept
•   Not a software artifact (unless the domain is software)
•   No responsibility assignment
•   Not a class
                                               Sales
•   IS an                                      Lineitem
    – Idea, thing, object
• Represented by                     Item
                                               quantity
    – Symbol                1
    – Intension             Item 2
    – Extension                      Item   A sale item represents
                            4               commodities being sold at
        • All examples of items
                            Item 3          the store, and registered in
                                            the POST
Identifying Concepts
• Based on Use Cases
• Guidelines
  – Better to over-specify than under-specify
  – Not all are identified in this initial phase
     • Can be added at later phases
  – Do not exclude
     • Because requirements do not specify a need
     • It has no attributes
     • Not an information-related object (I.e., behavioral)
  – Use categories
   Conceptual categories
Concept Category              Examples            Concept Category            Examples
                                                                         Hunger
Physical, tangible      POST, Airplane            Abstract nouns
                                                                         Acrophobia
                        Product Specifications,
Description of things                                                    Sales Department
                        Flight Description        Organization
                                                                         Airline
                        Store
Places                                                                   Sale, robbery, meeting
                        Airport                   Events
                                                                         Flight, crash, landing
                        Sale, Payment                                    Selling A Product
Transactions                                      Processes (possibly)
                        Reservation                                      Booking A Flight
                        Sales Line Item                                  Refund policy
Line item                                         Rules
                        Flight leg                                       Cancellation policy
                        Cashier                                          Product catalog
Role of people                                    catalogs
                        Pilot                                            Parts catalog
                        Store, Bin                Records of             Receipts, contracts
Containers of things
                        Airplane                  information            Maintenance log
                        Item                                             Line of credit
Things in containers                              Finance instruments
                        passenger                                        stock
                        Credit card Authority                            POST manual
External systems                                  Manuals, books
                        Air Traffic Control                              Repair manual
Another strategy
• Nouns in problem description
• Nouns in use cases
• However: Some are concepts and some are
  attributes
  – How do we distinguish between them?
• Use in combination with categories strategy
                    Example – use case 1
             Actor Action                               System Response
1. A customer arrives at the POST with
items
2. Cashier records the identifier of each     3. Determine item price, adds item
item, and its quantity.                       information to running sales transaction
4. On completion, Cashier indicates the end   5. Calculates the total
of items to the POST

6. Cashier tells Customer the total
7. Customer gives cash payment
8. Cashier records the sale                   9. Shows balance due
10. Cashier deposits the cash , returns       11. Logs completed sale
balance and gives printed receipt
12. Customer leaves
    Example – use case 1
             Actor Action                               System Response
1. A customer arrives at the POST with
items
2. Cashier records the identifier of each     3. Determine item price, adds item
item, and its quantity.                       information to running sales transaction
4. On completion, Cashier indicates the end   5. Calculates the total
of items to the POST

6. Cashier tells Customer the total
7. Customer gives cash payment
8. Cashier records the sale                   9. Shows balance due
10. Cashier deposits the cash , returns       11. Logs completed sale
balance and gives printed receipt
12. Customer leaves
Concepts for POST
•   POST              •   Product Specification
•   Item              •   Sales Line Item
•   Store             •   Cashier
•   Sale              •   Customer
•   Payment           •   Manager
•   Product Catalog   •   Receipt?
Naming the concepts
• The Mapmaker strategy
  – Use existing names with clear domain-relation
    meaning
     • I.e. “Borrower” in library, not “customer”
     • “POST” and not “register”
  – Exclude irrelevant features
     • “pen” or “paper bag”
  – Do not add things not in the domain
     • “truck”
Attribute or concept?
• If we do not think of some concept X as a
  number or a text in the real world, X is
  probably a concept, not an attribute
• Example

      Flight              Flight   Airport

    destination                     name
Specifications and Description Concepts

• Descriptions and specifications of other objects are
  important concepts
• They are strongly related to the things they describe
• Example 1:
                  Item                 Specifications
               Description
                                        Description
                 Price                                            Item
                                          Price      Describes
               Serial num
                  UPC
                                          UPC       1        * Serial num

• Example2:      Flight                                   Describes
                             Described by   description
                                                          flight-to     airport
                  Date       *          1                 1         *    name
                  time                       number
Some UML terminology clarifications


• Class – “ a description of a set of objects that share the same
  attributes”
    – Can mean also a specification
    – Implemented software class is “implementation class”
• Operation – “a service that can be requested from an object to affect
  behavior”
• Method – the implementation of an operation
• Type – similar to class – set of like objects with attributes and
  operations. Language independent. Not an implementation, but a
  specification.
• Interface – externally visible operations. Associated with types and
  classes
• We use “concept” for real-world things, while class is used for
  software specifications and implementations.
Criteria for making associations
• Associations for which knowledge of the
  relationship is needed for some period (“need to
  know”).
   – Example: Sale : Manager, SaleLineItem : Sale
• Derived from Common Associations List
   – Example: Cashier : Store, Sale : POST
• No logical direction, just syntactic
   – Example: POST records-current Sale
   – Default: left-to-right, top-to-bottom
Associating concepts – The Common
Association List
      Category                   Examples                   Category              Examples
A is physically part of    Drawer – POST              A is organization     Dept. – store
B                          Wing - airplane            subunit of B          Mainten. - airline
A is a logical part of B   Sales line item – sale     A uses or manages B   Cashier – POST
                           Flight leg – flight                              Pilot – airplane
A is physically            POST – Store               A communicates with   Customer – Cashier
contained in B             Passenger - airplane       B                     Reserv. Agent - passenger

A is logically contained   Item descr. – catalog      A is related to a     Customer – payment
in B                       Flight – flight schedule   transaction B         Passenger – ticket
A is a description of B    Item descr. – Item         A is a transaction    Payment – sale
                           Flight descr. – Flight     related to another    Reservation – cancell.
                                                      transaction B
A is a line item in a      Sales line item – sale
                                                      A is next to B        POST – POST
transaction B              Maint. Job – maint. log
                                                                            City – City
A is known/logged in B     Sale – POST
                                                      A is owned by B       POST – store
                           Reser. – flight manifest
                                                                            Plane - airline
A is a member of B         Cashier – store
                           Pilot - airline
                        More rules
                                         Category                   Examples
• High priorities:                 A is physically part of    Drawer – POST
                                   B                          Wing - airplane
• Remember:
                                   A is a logical part of B   Sales line item – sale
    – “Finding concepts is MORE                               Flight leg – flight
      important than finding all
                                   A is physically            POST – Store
      associations”                contained in B             Passenger - airplane
    – Too many associations are
      bad                          A logically contained      Item descr. – catalog
                                   in B                       Flight – flight schedule
    – Focus on “Need to know”
                                   A is a line item in a      Sales line item – sale
• May be multiple associations     transaction B              Maint. Job – maint. log
    – Examples:                    A is known/logged in B     Sale – POST
        • Flies-to,                                           Reser. – flight manifest
        • Flies-from
Roles of Concepts in Associations

• Each end of association represents a ROLE
  – May have a name
  – May have multiplicity
  – May have navigability
• Example:
      SalesLineItem
                      *
                          Described-by    1 ProductSpecification
      quantity
                               prodSpec     Description
                                            Price
                                            UPC
Associations and Implementation
• Not statement of data or control flow
• Is only statement about relations between
  analytical concepts of the Real World
• Is suggestive for flow and data flow in the
  implementation
• Some may not be used
• Some may be found later as missing and
  necessary
POST Associations
• Need to know associations:
  – POST Captures Sale       In order to know the current sale, generate a
                             total, print a receipt


  – Sale Paid-by Payment     In order to know if a sale has been paid, relate
                             the amount tendered to the sale total, and print
                             a receipt



  – ProductCatalog Records   In order to retrieve an ItemSpecification,
                             given a UPC
    ItemSpecification
POST Association from Association Checklist

       Category                  Examples                  Category             Examples
 A is physically part of    Not applicable           A is organization     Not aplicable
 B                                                   subunit of B
 A is a logical part of B   Sales line item – sale   A uses or manages B   Cashier – POST
                                                                           Manager-POST
 A is physically            POST – Store                                   Manager-Cashier
 contained in B             Item - Store
                                                     A communicates with   Customer – Cashier
                                                     B
 A is logically contained   Item descr. – Catalog
 in B                       Catalog – Store
                                                     A is related to a     Customer – payment
 A is a description of B    Item descr. – Item       transaction B         Cashier – payment
                                                     A is a transaction    Payment – sale
 A is a line item in a      Sales line item – sale   related to another
 transaction B                                       transaction B
 A is known/logged in B     (curr)Sale – POST        A is next to B        POST – POST
                            (compl)Sale – Store
                                                     A is owned by B       POST – store
 A is a member of B         Cashier – store
POST Conceptual model
             Build artifacts dependencies
                              Use cases:
Test cases                                       Use cases
               Windows &         real
                Reports
                                                 Use case
                                   Interaction   diagrams
                Methods
                                    diagrams
                                                 Conceptual
                                 Design class      model
                  Class &
                 Interface        diagrams
                definitions
                                                 Glossary

                               Architecture        System
                                Package           sequence
                                diagrams          diagrams


                                                 Operations
                                                 contracts
                                  Database
                 SQL
                                  schema
                                                    State
                                                  diagrams

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:9
posted:5/16/2012
language:English
pages:24
fanzhongqing fanzhongqing http://
About