CSCE 431 Lecture 8

From Notes
Jump to navigation Jump to search

« previous | Thursday, February 6, 2014 | next »


Finding Design Classes

advice:

  • Reuse code and existing solutions
  • avoid bugs and reinvention
  • consider abstractions as "machines" rather than "objects"

Finding Implementation Classes

Reuse!

  • standard library

Different Kinds of Objects

Following categories can be identified[1]

entity objects
persistent information tracked by system
application domain objects ("business objects")
boundary objects
interaction between user and system
control objects
control tasks performed by the system
Note: Think MVC architecture.

Example: Digital Watch

Entities:

  • year
  • month
  • day

Control:

  • Changedate

Bundaries:

  • Button
  • LCDDisplay


Identifying Entity Objects

  • Recurring nouns in requirements
  • Real-world entities and processes that system must track
  • Data sources (sensor) or sinks (outputs)

Identifying Boundary Objects

  • Collect information from user
  • translate information into format for entity and control objects
  • UI controls to initiate actions
  • Forms to enter data
  • Messages the system uses to respond

Identifying Control Objects

  • Coordinate boundary and entity objects
  • Do not have concrete counterpart in real world
  • Identify one control object per business task


More UML

Sequence Diagram

  • Ties use cases with objects
  • Distributes behavior among participating objects
  • more concise (and possibly more precise) than text-based descriptions
  • Encapsulates lifetime of objects («create» and «delete»)

State Machine Diagram

Represents Behavior from single object's perspective (versus use-case perspective) More abstract than a simple hardware-based FSM diagram


Footnotes

  1. Jacobson, Booch, Rumbaugh: The Unified Software Development Process. 1999: Addison-Wesley