CS%204233%20Review - PowerPoint PPT Presentation

About This Presentation
Title:

CS%204233%20Review

Description:

... of related objects without specifying their concrete classes. Concrete Factory ... Define skeleton of an algorithm, deferring steps to subclasses. Mediator ... – PowerPoint PPT presentation

Number of Views:19
Avg rating:3.0/5.0
Slides: 16
Provided by: georgeh1
Learn more at: http://web.cs.wpi.edu
Category:

less

Transcript and Presenter's Notes

Title: CS%204233%20Review


1
CS 4233 Review
  • Feb 25 2003

2
Outline
  • Previous Business
  • My.wpi.edu contains all grades to date for course
  • Review and contact TA/prof for questions
  • New Business
  • HW5 solution due tomorrow 500 PM

3
TAOO Questions
  • What is the difference between links and
    associations?
  • What is the practical impact of maintaining a
    bidirectional association?
  • What is difference between aggregation and
    composition?
  • What is difference between (1) Class C extends
    class A and (2) Class C uses class A as a
    servant class.

4
TAOO Questions
  • How are N-ary relationships implemented?
  • Describe associations and links
  • How are core operations relevant to N-ary
    relationships?
  • How is a collection manager different from a
    container?
  • Backward Containment vs. Forward Containment

5
Java and OO
  • Polymorphism, Sub-classes
  • Interfaces, Sub-interfaces
  • Methods
  • Access (public, protected, private)
  • Static methods

6
Model View Controller
  • MVC
  • its variations
  • responsibilities assigned to M, V, and C
  • Use in GUIs
  • Precursor to EBC

7
Entity Boundary Controller
  • EBC as consolidated approach to analysis
  • Use cases ? Control, Boundary objects
  • Domain Analysis ? Entity objects
  • Describe interactions between controllers
  • Controllers can be abstract to represent
    commonalities
  • Specialized subclasses contain variations

8
EBC
  • All objects are not created equal
  • Entity ? Represent persistent information
    required to implement desired system
  • Boundary ? Represent interactions between actors
    and system
  • Control ? Represent tasks that are performed by
    user and supported by system

9
EBC
  • Boundary object presented to user
  • Event/action takes place
  • Controller created (or invoked) to manage
    behavior
  • Controller may display addl boundary
  • Controller manages updates to entities and
    boundaries

10
Object properties
  • Cohesion
  • Coupling
  • Communication with other objects
  • Sequence diagrams

11
Law of Demeter
  • Within a method, messages can only be sent to
  • Its enclosing object
  • A parameter of the method
  • For pragmatic reasons includes global objects
  • Attributes of the enclosing object
  • Includes elements of a collection
  • An object returned by a method of the enclosing
    object
  • An object created within the method

12
Demeter Summary
  • Guideline for design
  • Many reasons for breaking its laws
  • Most are pragmatic and therefore unsound
  • Replace micro-management with delegation

13
Design Patterns
  • Creational
  • Singleton
  • Restrict access to the instance(s) of a class
  • Abstract Factory
  • Provide an interface for creating families of
    related objects without specifying their concrete
    classes
  • Concrete Factory
  • Consolidate all constructors in one place
  • Factory Method
  • Delegate construction to subclasses

14
Design Patterns
  • Behavioral
  • Iterator
  • Access elements of an aggregate object
    sequentially without exposing underlying
    representation
  • Visitor
  • Define a new operation to be performed on
    elements of an object structure
  • Avoid changing the classes of the elements on
    which the visitor operates

15
Design Patterns
  • Behavioral
  • Template Method
  • Define skeleton of an algorithm, deferring steps
    to subclasses
  • Mediator
  • Encapsulate how a set of objects interact
  • Command
  • Encapsulate a request as an object
Write a Comment
User Comments (0)
About PowerShow.com