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. In particular, expect to answer questions about coupling
and cohesion and also to draw UML class and sequence diagrams.
Review Questions
- 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?
- Describe how the checkers program could be rewritten using the MVC
Pattern.
- Explain how JavaFX implements MVC. Why might its implementation of
MVC be inadequate for large projects?
- Name 3 examples 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.
- 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?
- Computing the distance between two GPS coordinates requires a lot of
geometry since the earth is not precisely spherical. Suppose you write a
Lambda to compute the distance between two GPS coordinates. Use this to
explain API, GET, JSON, API Key, and endpoint.
- 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.
- Can you think of a way to use Lambdas to implement Step functions
without incurring overhead?
- 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?
- Could the Singleton pattern be used for implementing a scheduler
where there is a different scheduler for each day of the week?