Info and Review for CS494, Exam 2, Spring 05

Did you get copies of all the handouts and photocopied readings in class? See the list at the end!
Last updated Friday, May 6, 2 pm. Final version!


Info on Exam:

You may take the exam during the exam period meeting: Thursday, May 12, 10-noon. Meet in Olsson 001!
Or, you may do the exam as a take-home before that. Pick it up from me in my office during office hours as follows:


Pick up the exam from Prof. Horton at during these times. These are also office hours if you need help or have questions.

Here are the things you need to know about the exam:

If you have other questions, email me.


Review and topics:

UML:


Architecture and Design:

From the slides On to Design and related readings. Main topics include:


Refactoring:


Design Patterns:

Which ones? All of the ones we've studied! Singleton, Composite, State, Observer, Factory Method, Abstract Factory, Decorator, Facade

  1. What's a static factory method? How is this related to a constructor?
  2. Explain the general structure of an Abstract Factory?
  3. Which of the above patterns use the concept of delegation? How? Explain.
  4. Which of the above patterns use an interface or abstract class as part of their solution? How do they use this? What is the design rationale for using this?


Design Quality:

Topics include:

Questions:

  1. Give reasons why account information and customer information should not be combined in one class. What's a better solution.
  2. Give examples of when inheritance is less desirable than composition.
  3. Say a system supports users, some of whom can take on special roles at times, such as ProjectDirector for a given project. Is inheritance appropriate to model users and directors, or is there an alternative?
  4. Talk about Square, Rectangle, and the Liskov subsitutability princple.
  5. What does the ISP say about extracting interfaces from classes?
  6. Give some examples of using Dependency Inversion Princple in action? Does this somhow relate to package design too?


Package Design:

  1. Give 3 reasons to group a set of classes in the same package.
  2. What does the Reuse Equivalency Princple say about the re-use or release of Java classes?
  3. In UML, what's the most important thing we model about relationships between packages? What is one rule about such relationships?
  4. What are design princples related to the stablity and abstractness of packages in a system?
  5. What is a reasonable metric of measuring a package's abstractness?
  6. What are the basic ideas of other package design principles?


List of Readings and Handouts:

  1. Law of Demeter. Photocopy from The Pragmatic Programmer.
  2. Principles of OOD. Chapter 6 from Bob Martin's book, UML for Java Programmers.
  3. Refactoring. Photocopy of Chapter 8 from Wampler's book.
  4. Object-oriented Design. Photocopy of Chapter 7 from Ambler's book, The Object Primer.