Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS 644 Thurs. Sept. 30, 1999 W6B … assignment: 2ed object model … patterns … Java … assignment: Java … patterns.

Similar presentations


Presentation on theme: "CIS 644 Thurs. Sept. 30, 1999 W6B … assignment: 2ed object model … patterns … Java … assignment: Java … patterns."— Presentation transcript:

1 CIS 644 Thurs. Sept. 30, 1999 W6B … assignment: 2ed object model … patterns … Java … assignment: Java … patterns

2 viewing lecture files: detached view can be resized detached browser can be resized works OK for me

3 oops.. correction.. getAutos method in Agency Agency.getAutos(…) -> myAutos.getAutos(…) easier to find primary UI ops

4 status, directions: chap 1 design.. more examples chap 2 composition chap 3 interfaces patterns … chap 4 threads

5 Assignment:

6 Video 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

7 interfaces for: addVideo addCustomer rent … a video return.. a video payFee … towards late fee getCustomerInfo getVideo Info (by name)

8 scenarios for: add video rent video return video

9 missing:..will do later log of transactions load & store data backup recover from log

10 work in pairs …

11 BadarpuraHubka BhaktaCarlson BodapatlaGardner Boina FengBohra ForgieSun JakherPallack LaneRubio LiuHorn ParanjpeTyree Terrazas WuSpriegel Zhang Ali

12 composite pattern: transparency vs safety

13 public interface IComponent { void operation( ) ; boolean isLeaf(); void add( Component C) throws IComponentException; void remove( IComponent C); IComponent[ ] getComponents(); }

14 public class Leaf implements IComponent { // class definition here boolean isLeaf () { return true;} IComponent [ ] getComponents() { return null } ; }

15 public class Composite implements IComponent { // class definition here IComponent [ ] children; boolean isLeaf () { return false;} }

16 assignment: 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.

17 Iterator: 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

18 Proxie … 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

19 Visitor: an operation to be performed on elements of a structure... allows new operations to be defined without changing elements of the structure.. p. 331

20 END


Download ppt "CIS 644 Thurs. Sept. 30, 1999 W6B … assignment: 2ed object model … patterns … Java … assignment: Java … patterns."

Similar presentations


Ads by Google