Closed-book, closed-note, and using Canvas.
Review
Bring your textbook to the review!
These are sample questions; some may be on the exam, but the exam question
is likely to be worded differently and there will be questions on other
material as well. Use these to make
sure you are familiar with each of the topics, to get practice thinking
about the sorts of questions you will see, and to make sure you know
the technical terminology.
General approach:
- know material, terminology; be ready to apply it
- ensure you are telling me all that's relevant
- be cautious of using the terms in the question in your answer
(especially for definitions!)
- think in terms of answering in sentences
- If a question asks for a reason, you might ask your self "why?" a couple
times to make sure you really do give a reason or otherwise go beyond
what's written in the question itself.
Topics
The exam will cover all of the material since the beginning of the
term. Ask if you are not quite sure what material that includes! Some key
things to know:
- Rational for studying design patterns and how they are communicated.
- How to apply the noun identification method to construct domain class
diagrams.
- The RIBS criteria for classes: you should be able to identify each in
good domain classes.
- Coupling
- UML notation, especially for class diagrams; practice drawing the
notation!
- Design patterns, including
- names, indicators, advantages of using, disadvantages
- constructing class and sequence diagrams showing the application of
a design pattern to a problem
- writing code illustrating applying the pattern
Don't try to memorize diagrams and code; you will remember just pieces of
it and fail to apply key concepts. Understand how the pattern works and
you can apply it in new domains.
- When to use an abstract class and when to use an interface (in Java).
- General design principles such as don't repeat yourself.
- Other technical terms discussed in lecture and the textbook(s).
This is
not a comprehensive list. But these items tend to
show up on quizzes and exams, so provide a solid starting point. Do read
the textbook: it gives important context that helps you remember key
concepts and explanations.
Review Questions
- What are advantages of object-oriented designs over non-OO designs
(that is, procedural designs: collections of steps)?
- What would you tell a student in Data Structures to encourage them to
prioritize domain classes in their designs?
- Give three or more examples of classes that would appear in a solution
space but not a problem space.
- What are the goals of the noun (and verb) identification method for
systems design?
- Name 3 things that fail to have identity.
- Consider a registration system: what would be good responsibilities for
- Class, Section, Schedule, Room,
Student, Instructor, Professor
- Draw a class diagram showing the relationships between these (and
any other obvious classes).
- How would advisors be handled in this system?
- Suppose a design includes a class called Main that captures
the main in a program along with other stuff. Explain how this
class violates the RIBS criteria in multiple ways.
- Explain how a high-level class diagram (covering just domain classes)
is useful in system design.
- How would you describe the design pattern for a classroom? What would
be the features? What would be reasons to not apply this pattern?
- Explain how the Null Object pattern shows up in JavaFX and draw a class
diagram illustrating it. Discuss any negative consequences for using the
Null Object pattern, applying those negatives to JavaFX programming.
- The Adapter pattern was initially described as allowing a team to
replace one library by another. Give two other reasons to use the pattern.