0% found this document useful (0 votes)
40 views

Approaches For Developing Dynamic Systems

Here are some modifications based on the discussion: - okToBorrow() moved to LibraryMember to check member status - LendableTitle creates the LoanTransaction - LendableTitle informs LibraryMember of new LoanTransaction - LoanTransaction constructor calculates due date as checkOutDate + loanPeriod Does this capture the key changes discussed? Let me know if any part needs more explanation.

Uploaded by

sufyanasif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Approaches For Developing Dynamic Systems

Here are some modifications based on the discussion: - okToBorrow() moved to LibraryMember to check member status - LendableTitle creates the LoanTransaction - LendableTitle informs LibraryMember of new LoanTransaction - LoanTransaction constructor calculates due date as checkOutDate + loanPeriod Does this capture the key changes discussed? Let me know if any part needs more explanation.

Uploaded by

sufyanasif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 18

APPROACHES FOR DEVELOPING DYNAMIC SYSTEMS

 Top - down approach for dynamic systems

 Bottom-up approach for dynamic systems


 Top-Down Approach - start with use cases and step
through scenarios to identify specific objects, their
methods, and the links between objects.

 Bottom-Up Approach - start with classes and step


through scenario to identify specific object methods,
attribute, and links, and then refine/expand these
responsibilities as each scenario is validated.
 The goal of each approaches to identify the required links
between objects, the methods each object must have, and
to some extent, what each method must do.
 The design artifacts are often the same.
 The artifact include:
◦ A list of use cases (system functions) and their
descriptions.
◦ A set of scenarios (use case instances) for each use case.
◦ An interaction diagram for each scenario.
◦ State transition diagrams for estate based classes.
◦ Additions and modifications to class diagrams.
 The top-down approach starts with use cases and “drill
down” in each to determine the associations and methods
required in the class diagram.
 The steps in this approach are as follows:
◦ Identify the use cases of system behavior.
◦ Specify and refine each use case: The use case
specification can take any of several different forms
w.r.t. a particular case study.
◦ Define a scenario for each “interesting path” through the
use case. If you draw an activity diagram to “flowchart”
each use case, for example, each of its path defines a
scenario.
◦ Draw an interaction diagram for each scenario.
◦ Identify object methods form object interactions in
the interaction diagrams. If an object of class C
receives event e in an interaction diagram, then
class C should list method e in its third
compartment in the class diagram.
◦ Define each state-based object’s behaviour with a
state transition diagram using interaction diagrams
for guidance. Typically, any events consumed and
produced by the state transition diagram are
messages to and from that object in the interaction
diagrams.
 Jacobson’s Approach
Identify actors
Find out what interactions the actor initiates with
the system and what interactions the system initiates
with the actor
 Determine what use cases cause the creation,

deletion, and modification of objects that belong to


classes in your class diagram
 Verb phrases may reveal some use cases
 The actor is the Service Representative
 Some use cases....

Enter a buy order


Enter a sell order
Cancel an existing order
Create a new account
Execute a transfer of stock into the system
Execute a transfer of stock out of the system
Execute a transfer of cash into the system
Execute a transfer of cash out of the system
Query the system
What other use cases can you identify?
How did you identify them?
 Describe the use case
 Detail the steps involved
 If necessary, draw an activity diagram
 Come up with a textual description that includes the

trigger for the use case and pre- and post-conditions


: Trading
Rep : Rep
System
1: enterBuyOrder
: Trading : Account
Rep : Rep
System
1: enterBuyOrder
2: getBalance
: Trading : Account newBuyOrder : : Stock
Rep : Rep
System BuyOrder
1: enterBuyOrder
2: getBalance

3: new

4: addBuyOrder(newBuyOrder)
 Identify classes
 Determine their responsibilities - state and

behavior
 Validate responsibilities using relevant scenarios
 Draw an interaction diagram for each scenario to

ensure that all responsibilities have been


identified. Add/modify responsibilities as needed
 Book, BookCopy, Video, VideoCopy,
LibraryCard, LibraryMember, LoanTransaction
 A BookCopy must know:

Its unique item number


Its status (available or not)
It must be able to check itself out
It must be able to return itself (check in)
<<facade>>
Library

* 1..1 checkIn ()
checkOut ()1..1
1..1

1..*
LibraryCard LoanTransaction LendableTitle
0..* title
memberNumber : String checkOutDate : Date
expiryDate : Date dueDate : Date
1..1 0..*
renew( ) isOverdue( ) 1..1
1..1 0..*
1..1
LibraryMember
name rented1..1
address <<Abstract>> 1..*
Lendable
setName( )
setAddress( ) item#
okToBorrow( )
checkIn( )
checkOut( )

BookCopy VideoCopy
call# video#
 Use scenarios
 CheckOut scenario is as follows:

a) Clerk provides member# and item#


b) System checks to see if it is okay to borrow
c) System checks out the item
 Where should the method okToBorrow() really be?
 Who creates the Loan Transaction? (Lendable

perhaps)
 Who should inform the LibraryMember object about

the new LoanTransaction?


 How is the due date determined?
rep:Clerk :Library a :LendableTitle lt:Loan :LibraryCard
Lendable:Lendable Transaction

1: checkOut(1001, 2345)
2: okToBorrow()

3: checkOut()
4: loanPeriod()

5: new(lc, aLendable, today + 14)


6: addLoanTransaction(lt)

You might also like