Title: M.Sc. Computing Science, Software Engineering Object Oriented Design using Borland Together Architec
1M.Sc. Computing Science, Software
EngineeringObject Oriented Design using
Borland Together Architect
- Sandeep Mittal (sandeep_at_dcs.bbk.ac.uk)
- Niki Trigoni (niki_at_dcs.bbk.ac.uk)
- 23 Nov 2006
- Department of Computer Science and Information
Systems - Birkbeck, University of London
2Software Development Life Cycle
3Methodology
- Methodology - Unified Process (UP)
- UP
- prescribes iterative development process which
helps to provide continuous feedback and
adaptation - uses object-oriented analysis and design (OOA/D)
- uses UML to illustrate analysis and design models
4UP Artifacts
Process Sale
UP Use-case Model - write requirements
Payment date time
Sale amount
Paid-by
UP Domain Model - identify conceptual classes
1
1
Sale amount getBalance()Money
Payment date Time getTotal()Money
Paid-by
- UP Design Model
- design objects and
- their interactions
1
1
5UP Artifacts
Process Sale
UP Use-case Model - write requirements
Payment date time
Sale amount
Paid-by
UP Domain Model - identify conceptual classes
1
1
Sale amount getBalance()Money
Payment date Time getTotal()Money
Paid-by
- UP Design Model
- design objects and
- their interactions
1
1
6From requirements to design
- A use-case realization describes how a particular
use case scenario is realized within the design
model, in terms of collaborating objects. - To recall features of different disciplines (and
artifacts) - The use case suggests the system events,
explicitly shown in system sequence diagrams. - System contracts describe the effect of the
system events in terms of changes to domain
objects. - System events represent messages that initiate
interaction diagrams. - Interaction diagrams involve message interaction
between objects these messages are mapped to
methods in Desgin Class Diagrams.
7Design Model
- Design
- A conceptual solution that fulfills the
requirements. - Design Modeling
- Design objects and their interactions
- Main artifacts
- Static view Design Class Diagrams
- Dynamic view Interaction Diagrams
- Interaction and Class diagrams are created in
parallel.
8Design Class diagrams
- Design Class Diagrams (DCD)
- Provide static view of the system
- DCDs illustrate
- Classes and interfaces
- Associations
- Attributes and often their types
- Methods, their parameters, and often parameter
and method result types
9Interaction Diagrams
- Interaction diagrams
- provide dynamic view of the system
- illustrate how objects interact via messages and
collaborate to fulfill the requirements - Two kinds
- Collaboration diagrams
- Sequence diagrams
10Interaction Diagrams
- Collaboration diagrams
- illustrate object interactions in a graph or
network format, where objects can be placed
anywhere in the diagram. - Sequence diagrams
- illustrate object interactions in a fence
format, in which each new object is successively
added to the right.
11Demo System
- Customer Sales at a store.
- Use Case UC1 Process Sale
- A customer arrives at a checkout with items to
purchase. The cashier uses the system to record
each purchased item. The system presents a
running total and line-item details. The customer
enters payment information, which the system
validates and records. The system updates
inventory. The customer receives a receipt and
leaves with items.
12Domain Model
13Use Case UC1 Fully Dressed
- Process Sale
- Main Success Scenario (or Basic Flow)
- Customer arrives at checkout with goods to
purchase. - Cashier starts a new sale.
- Cashier enters item identifier.
- System records sale line item and presents item
description, price and running total.
14System Sequence Diagram (SSD) for UC1
15System Sequence Diagram (SSD) for UC1
16Contract C02 enterItem
- Operation
- enterItem(itemIditemId, quantityinteger)
- Cross References
- Use Cases Process Sale
- Preconditions
- There is a sale underway
- Postconditions
- SalesLineItem instance sli was created
- sli was associated with the current Sale
- sli.quantity became quantity
- sli was associated with a ProductSpecification
17 18Create a Project
- Create a project to hold all your work.
- Keeps object definitions, diagrams and source
code together. - Uses same object definitions for multiple diagrams
19Design Class Diagrams
- Create Design Class Diagram
- On-the-fly code generation
20Domain Model
21Interaction Diagrams
- Create Sequence diagram
- Generate Java code from Sequence diagram
- Convert Sequence diagram to Collaboration diagram
22Use-case realization Collaboration Diagram
Contract C02 enterItem Preconditions There
is a sale underway Postconditions - A
SalesLineItem instance sli was created -
sli was associated with the current Sale -
sli.quantity became quantity - sli was
associated with a ProductSpec
2makeLineItem(spec,qty)
enterItem(it,qty)
Register
Sale
1specgetSpec(id)
2.1create(spec,qty)
2.2add(sl)
Product Catalog
slSalesLineItem
23Reverse Engineering
- Creating Sequence Diagrams from source code.
24Customizing Borland TA
- You may want to customize the Borland TA settings
so that you get the same behaviour of the tool
when working on different machines. - Customize settings at Project level.
25Customizing at Project level
- Options-gtGeneral Tab
- Enable Drag and Drop Check
- Diagram-gtAssociations Tab
- Draw Directed All
- View Management-gtJavaBeans/CProperties Tab
- Uncheck all the options on this tab.
- View Management-gtSequence Diagram Tab
- Create Return Arrow Check
- View Management-gtSequence Diagram-gtGenerate
Source Code Options Tab - Never change existing code Uncheck
- Source Code-gtLive Source Support Tab
- Java Check
- Uncheck options for all other languages
26