Skip to content

Latest commit

 

History

History
119 lines (94 loc) · 3.36 KB

Exam Review.md

File metadata and controls

119 lines (94 loc) · 3.36 KB

Exam Review Exercises

Exercise 1: UML Use-Case Diagram

Remote content provider using an existing third-party content provider.

// 'existing' makes the third party an actor

Actors:

  • regular users
  • premium users
  • third-party content provider

Regular users:

  • can browse video content from external content provider [detailed]
  • can steam video content from external content provider [detailed]

Premium users:

  • can browse video content from external content provider [detailed]
  • can steam video content from external content provider [detailed]
  • can download video content from external content provider [detailed]
  • can browse video content locally [detailed]
  • can steam video content locally [detailed]

Tips

  • better not to split up high-level use-case based on users
  • best local + remote content

High-level

Access Local Content

  • premium initiates

Access Remote Content

  • regular initiates
  • premium initiates
  • third-party participates
    • this implies they participate with all derived use-cases

Detailed

Access Local Content

  • includes browse local video
  • includes stream local video
  • includes download + store video
    • third-party participates

Access Remote Content

  • includes browse remote video
    • extends connection error
  • includes stream remote video
    • extends connection error

Sequence Diagram: Download + Store Video

sequence-exam-1

Exercise 2: UML Use-Case Diagram

  • social media service with API for other remote social media sites
    • allows users of remote sites to:
      • manage newsfeed [high-level]
        • by retrieving other users' posts [detailed]
        • modifying newsfeed settings [detailed]
      • mange posts [high-level]
        • post new status updates [detailed]
        • upload photos / videos [detailed]

High-level

Manage Newsfeed

  • third-party site user initiates
  • includes retrieve newsfeed posts
    • extends connection error
  • includes modify settings
    • extends connection error

Manage Posts

  • third-party site user initiates
  • includes retrieve post new status updates
    • extends connection error
  • includes upload photos / videos
    • extends connection error

Sequence Diagram: Retrieve Newsfeed

sequence-exam-2

Sequence Diagram Steps

  1. figure out which actor initiates use-case
  2. select boundary object used to initiate use-case
    • named with a noun-phrase
    • e.g. candidates: download option, submit form request
  3. boundary object creates control object
    • named with a verb-phrase
      • e.g. DownloadMusicControl
  4. control object dictates logic
    • entity object may be created then saved
    • information may be saved directly
    • new boundary object may be created
      • reply / notification to initial actor
      • to communicate with third-party actor
  5. all created objects are destroyed
    • original boundary object remains

Types of Design Problems

  • creational: object creation [mechanisms]
    • abstract factory
  • structural: simplification of object associations / relationships
    • adapter
    • bridge
    • composite
    • façade
    • proxy
  • behavioural: communication patterns between objects
    • command
    • observer
    • strategy