Docsity

Introduction to Software Engineering: Conceptual Modeling and Associations, Slides of Introduction to Software Engineering

Partial preview of the text

Download Introduction to Software Engineering: Conceptual Modeling and Associations and more Slides Introduction to Software Engineering in PDF only on Docsity!

ECE 452- Introduction to Software Engineering Lecture 10: Object-Oriented Analysis^ (System Sequence Diagrams,

Conceptual Model) Manish Parashar

[email protected] Department of Electrical &Computer Engineering^ Rutgers University

ECE 452 - Introduction to Software Engineering

The Unified Analysis Process & UML ♦^ Use Case - What are the domain processes?^ −^ Use Case Diagram^ ♦^

high-level/expanded, essential/real ♦^ Conceptual Model - What are the domain concepts, terms?^ −^ Class Diagram (conceptual)^ ♦^

classes, associations, attributes ♦^ System Sequence Diagram - What are the system eventsand operations?^ −^ Interaction Diagram - Sequence Diagram ♦^ Contracts - What do the system operations do?^ −^ Contract Specs.

ECE 452 - Introduction to Software Engineering

From Analysis to Design^ ♦^ Use Cases^ −^ What are the domain processes?^ ♦^ Conceptual Model^ −^ What are the concepts, terms?^ ♦^ System sequence diagrams^ −^ What are the system events and operations?^ ♦^ Contracts^ −^ What do the system operations do?

ECE 452 - Introduction to Software Engineering

System Sequence Diagrams^ ♦^ Determine system events and operations^ ♦^ Derived from Use Cases – Typical course ofevents^ ♦^ Identify system functionality (operations) tobe designed^ ♦^ System boundary is critical

ECE 452 - Introduction to Software Engineering

System Sequence Diagrams^ ♦^ Draw a line representing the system as a blackbox.^ ♦^ Identify each actor that directly operates onthe system. Draw a line for each such actor.^ ♦^ From expanded use case identify systemevents that each actor generates. Ilustratethem.^ ♦^ Optionally include use case text on left.

ECE 452 - Introduction to Software Engineering

A System Sequence Diagram

system as black box enterItem(UPC, quantity)

:System

Cashier

endSale() Repeat until nomore items

makePayment(amount) Actor^ Text which clarifiescontrol, logic, iteration,etc. May be taken from theuse case.

Buy Items-version 1 system eventit triggers a system operation

ECE 452 - Introduction to Software Engineering

System Sequence Diagrams from Use Cases

: Cashier^

:System

Simple cash-only

Process Sale^ scenario:

  1. Customer arrives at a POS checkoutwith goods and/or services to purchase.2. Cashier starts a new sale.3. Cashier enters item identifier.4. System records sale line item andpresents item description, price, andrunning total.Cashier repeats steps 3-4 until indicatesdone.5. System presents total with taxescalculated.6. Cashier tells Customer the total, andasks for payment.7. Customer pays and System handlespayment....

makeNewSale() enterItem(itemID,quantity)^ description,total^ * [more items]^ endSale()^ total withtaxes makePayment(amount)^ change due,receipt

ECE 452 - Introduction to Software Engineering

Naming System Events and Operations

: Cashier^ enterItem(itemID, quantity)^ scan(itemID, quantity) better name worse name

:System

ECE 452 - Introduction to Software Engineering

System Behavior - Contracts ♦^ Contracts help define system behavior ♦^ Contracts are defined in part by preconditionsand postconditions ♦^ Examples in this chapter document systemoperations such as^ −^ enterItem^ −^ endSale^ −^ makePayment ♦^ However, contracts also apply to low-level methods

ECE 452 - Introduction to Software Engineering

The Conceptual Model- Introduction^ ♦^ Conceptual Model^ −^ illustrates meaningful concepts^ −^ most important artifact in OO analysis^ −^ need use cases as input^ ♦

but can develop uses cases as you do conceptual model ♦^ Question:^ −^ Provide names for the uses cases you found^ ♦

let's share this information now (use whiteboard)

ECE 452 - Introduction to Software Engineering

Domain Analysis^ ♦^ Define domain to be investigated^ ♦^ Categorize the items extracted from thedomain^ ♦^ Collect a representative sample of applicationsin the domain^ ♦^ Analyze each application in the sample^ ♦^ Develop an analysis model for the objects^ ♦^ Define reuse guidelines

ECE 452 - Introduction to Software Engineering

Conceptual Models^ ♦^ Conceptual Model^ −^ created for the use cases of the current cycle in thelanguage of the problem domain^ ♦^ Must identify^ −^ concepts - objects in our system^ −^ associations between concepts^ ♦

is part of, contains, manages, is-a, ... − attributes of concepts ♦ instance variables needed to hold state

ECE 452 - Introduction to Software Engineering

Conceptual Modeling^ ♦^ Associations^ −^ less important than identifying concepts^ −^ show only “need-to-know” association (avoidredundant or derivable associations)^ −^ name, multiplicity, navigability^ −^ multiple associations

ECE 452 - Introduction to Software Engineering

Conceptual Model^ ♦^ Attributes^ −^ Attributes Vs. Concepts^ ♦

keep attributes simple ♦ if in doubt define it as a concept ♦ no attributes as foreign keys (use associations)