You may bring one page of hand-written notes (possibly front and back, but
only a single sheet of paper) to the exam.
Review
- Remember, see exam 1 prep for things
like approach, making sure you answer questions, using technical
terminology
Topics
The exam will focus on material since exam 1, but may include some of the
older material.
Review Questions
- Explain how you could (usefully) apply the Adapter pattern to the
garden simulator lab.
- Name a pattern that improves coupling but not cohesion,
and name a pattern that improves cohesion but not coupling.
- Some engineers argue for a type of coupling based on
inheritance. Identify reasons to list this as a different type of
coupling and reasons to not.
- Are all uses of Java's reflection features
(like
setAccessible
) content coupling?
- Explain a possible reason behind the name of the worst type of
coupling, "content coupling". That is, explain the use of "content" in
that context.
- What type of cohesion does a Java program exhibit if it has just one
class,
Main
? Explain.
- What is the difference between temporal cohesion and procedural
cohesion?
- Why do you suppose the highest form of cohesion is termed
"functional"?
- Explain how JavaFX implements MVC. Why might its implementation of
MVC be inadequate for large projects?
- Name 3 forms of excise found in IntelliJ.
- Many websites go to the extreme of having very few choices on their
landing page while others have an overwhelming number. Why are both forms
of excise?
- Name 3 types of excise experienced in the everyday life of students
(not involving software).
- Explain two uses of the Command pattern besides eliminating
"do you really mean to do that?" messages.
- Draw the command pattern as it might be applied to registering for
courses in the coming semester.
- Identify how the Decorator pattern could be applied to a classroom in
a software system, describe that system, and draw a diagram showing the
application. Which classes need to be abstract or interfaces?
- Give significant differences between the Strategy and Decorator
patterns (so that a programmer could decide which to use).
- Can you write a Java application that uses threads that is guaranteed
to never terminate without just falling into an infinite loop?
- Do threads require multi-core CPUs? Explain.
- If a method is synchronized and two threads execute the method at the
same time, which goes first? Why?
- Explain what
Platform.RunLater
does.
- How do AWS Lambdas satisfy the "essential characteristics" of cloud
computing as identified by NIST?
- Why is JSON format often used to transmit data to and from AWS
Lambdas?
- What are some reasons to not use JSON format to transmit data to and
from AWS Lambdas?
- Suppose you are developing a new web-based application around AWS
Lambdas. It is always bad to introduce too many technologies, so you
decide to use Lambdas to implement Step Functions. Explain why this is a
bad idea.
- Would Pub/Sub be a good cloud pattern to use when an application
never needs more than one subscriber? Explain.
- When should you use the Singleton Pattern? Why is global access
important?