Title: CIS 644 Thurs. Sept. 30, 1999 W6B
1CIS 644 Thurs. Sept. 30, 1999 W6B
assignment 2ed object model patterns
Java assignment Java patterns
2viewing lecture files detached view can be
resized detached browser can be resized
works OK for me
3oops .. correction .. getAutos method in
Agency Agency.getAutos() -gt
myAutos.getAutos() easier to find
primary UI ops
4status, directions chap 1 design .. more
examples chap 2 composition chap 3 interfaces
patterns chap 4 threads
5Assignment
6Video Store rents videos video .. key index,
name rent for fixed price for N
days. late fee is 1 customer key
name address, phone cannot check if
owes max 10 out
7interfaces for addVideo addCustomer
rent a video return .. a video
payFee towards late fee getCustomerInfo
getVideo Info (by name)
8scenarios for add video rent video
return video
9missing ..will do later log of transactions
load store data backup recover from log
10work in pairs
11Badarpura Hubka Bhakta Carlson Bodapatla Gard
ner Boina Feng Bohra Forgie Sun
Jakher Pallack Lane Rubio Liu Horn
Paranjpe Tyree Terrazas Wu Spriegel Zhan
g Ali
12composite pattern transparency vs safety
13public interface IComponent void operation( )
boolean isLeaf() void add( Component
C) throws IComponentException void
remove( IComponent C) IComponent
getComponents()
14public class Leaf implements IComponent //
class definition here boolean isLeaf ()
return true IComponent getComponents()
return null
15public class Composite implements IComponent
// class definition here IComponent
children boolean isLeaf () return
false
16assignment build Java code snippet for
one pattern with some comments and for
typical operation build single web page
(email or provide url) open assignment
select specific pattern.
17Iterator also called a cursor external
iterator client requests next, get
Item internal iterator client passes
passes on operation, iterator applies op
to all items p. 258
18Proxie Coad , p. 101 Gamma , p. 207 an object
with a single association with actual
object provides interface of actual why p.
109 reuse UI remote proxie
virtual proxie protection proxie
19Visitor an operation to be performed on
elements of a structure. .. allows new operations
to be defined without changing elements of the
structure .. p. 331
20END