1 / 20

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

Explore design patterns in Java through lectures, examples, and assignments covering composition, interfaces, threads, and more. Develop a Video Store application with specified functionalities. Enhance understanding and implementation of composite pattern in Java.

letap
Download Presentation

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

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. Badarpura Hubka Bhakta Carlson Bodapatla Gardner Boina Feng Bohra Forgie Sun Jakher Pallack Lane Rubio Liu Horn Paranjpe Tyree Terrazas Wu Spriegel 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

More Related