Question details

CST 276 – Final Wilsonville, Fall 2016 2
$ 30.00

CST 276 – Final

Wilsonville, Fall 2016

 

This is a take home final. You must turn in your final on Blackboard by mid-night on Wednesday, 7 December 2016. You may use any and all resources available to you to complete this final. Turn in your own work. Do not copy/paste from a source (for example from the internet), instead read the source, understand the material and then put your answer into your own words.

Section 1 – Terminology and Concepts (50 points)

Answer each question in this section with enough detail that the instructor understands that you understand the term or concept.

 

  1. (6 points) Contrast the following terms:
    1. Class vs. Interface

 

  1. Composition vs. Inheritance

 

  1. Design vs Programming

 

  1. (5 points) What are “design patterns”? Describe what they are, where they come from and how they are used.
  2. (8 points) What is meant by the following design principle and why is it important? Name a pattern that is based on this principle and explain how. “Encapsulate what varies”.
  3.  

 

  1. (5 points) Why does the Observer pattern use an interface for the Observer object? What benefit does this bring to a design? What design problem does it solve?

 

  1. (5 points) Explain the similarities and difference between Factory Method and Abstract Factory patterns.

 

  1. (5 points) Explain how the Command pattern enables “undo” functionality in an application. Use an example in your explanation.

 

 

  1. (5 points) Explain the similarities and differences between Adapter and Façade patterns.

 

 

  1. (5 points) What is a “Hook”? How does the Template Method pattern make use of hooks? Given an example.

 

  1. (6 points) Name three patterns that MVC includes. Describe how these work together to accomplish the goals of the MVC pattern.

 

Section 2 – Understanding Patterns (20 points)

For each of the questions in this section, examine the given class diagram, identify any patterns used explain why or why-not the pattern is a good choice.

 

  1. (10 points) GUI form control input validation…
  2. (10 points) An industrial robot that assembles furniture…

Section 3 – Applying Patterns (30 points)

Read the problem statement and then draw and describe an object oriented design. Use pattern names in your description and explain why you chose those patterns.

 

  1. (30 points) Design a home alarm system. The system needs to include a control pad, sirens and plug-and-play remote sensors for doors/windows and motion. It should be possible to add new types of sensors in the future, for example smoke sensors. The system should have the ability to…
    1. “add” or “remove” a sensor
    2. “arm” and “disarm” by entering codes
    3. “alarm” when armed and a sensor is triggered, showing triggered sensor
    4. “remote monitor” by a monitoring station

 

Category: Education, General
Available solutions