• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 32 pages
Exam (elaborations)

Cse 335 Module 1 - Mobile Application Architecture And Design Patterns Questions With Answers And Explanations

Document preview thumbnail
Preview 4 out of 32 pages

Cse 335 Module 1 - Mobile Application Architecture And Design Patterns Questions With Answers And Explanations

Content preview

CSE 335 MODULE 1 - MOBILE APPLICATION ARCHITECTURE AND
N DESIGN PATTERNS QUESTIONS WITH ANSWERS AND EXPLANATIONS


Question 1. Which test would most directly validate the intended use of Service abstraction?
A. Swap the vendor implementation behind the adapter and verify that application-facing callers continue using the
same interface.
B. Update the authoritative state once and verify that every dependent screen converges on the same value without
manual synchronization.
C. Run domain use-case tests with no UI framework or database initialized and verify identical rule behavior.
D. Replace the network service with a deterministic fake and verify feature behavior using the same service contract.

Correct Answer: D. Replace the network service with a deterministic fake and verify feature behavior using the
same service contract.

Explanation: Replace the network service with a deterministic fake and verify feature behavior using the same service
contract. This directly validates the intended use of Service abstraction; the other checks target different concerns.

Question 2. The team observes that Formatting, asynchronous orchestration, and state restoration all
accumulate inside the view layer. Which principle or pattern is the clearest corrective direction?
A. Model-View-Controller
B. Error boundary and result mapping
C. Model-View-ViewModel
D. Unidirectional data flow

Correct Answer: C. Model-View-ViewModel

Explanation: Model-View-ViewModel is the most direct match. Place presentation state and UI-facing actions in a ViewModel
while keeping the view focused on rendering and user interaction.

Question 3. Which benefit most directly follows from using Cache-aside pattern in a situation where
Remote data is expensive to fetch but can be reused for a limited time without becoming the authoritative
record.?
A. Repeated reads avoid unnecessary remote work while freshness remains governed by an explicit cache policy.
B. Core tasks remain usable offline, with synchronization handled as a separate consistency concern.
C. Callers depend on a stable domain-facing API while source-selection and synchronization policy remain
encapsulated.
D. Callers remain independent of HTTP client or protocol details and are easier to test.

Correct Answer: A. Repeated reads avoid unnecessary remote work while freshness remains governed by an
explicit cache policy.

Explanation: Repeated reads avoid unnecessary remote work while freshness remains governed by an explicit cache policy.
That is the primary value of Cache-aside pattern for the stated requirement.

,Question 4. Engineers diagnose the following weakness: All feature code shares one large package with
unrestricted access to internal classes from every other feature. Which design idea most directly
counters it?
A. Adapter pattern
B. Model-View-ViewModel
C. Dependency inversion
D. Feature modularization

Correct Answer: D. Feature modularization

Explanation: Feature modularization is the most direct match. Organize code into feature-oriented modules with explicit public
boundaries and minimal cross-feature knowledge.

Question 5. Which verification activity best demonstrates that Environment and configuration separation
has been implemented effectively?
A. Update the authoritative state once and verify that every dependent screen converges on the same value without
manual synchronization.
B. Build two environments from the same code and verify that only configuration values differ while feature logic
remains unchanged.
C. Replace the view with a test double and verify that the controller coordinates model updates without requiring
storage logic inside the view.
D. Modify an internal class inside one feature and verify that other feature modules need no changes unless the public
contract changed.

Correct Answer: B. Build two environments from the same code and verify that only configuration values differ
while feature logic remains unchanged.

Explanation: Build two environments from the same code and verify that only configuration values differ while feature logic
remains unchanged. This directly validates the intended use of Environment and configuration separation; the other checks
target different concerns.

Question 6. An app has developed this maintainability problem: One method grows into a long switch
statement that contains every algorithm and every platform variation. Which concept best explains what
is missing?
A. Strategy pattern
B. Feature modularization
C. Unidirectional data flow
D. Navigation coordinator or router

Correct Answer: A. Strategy pattern

Explanation: Strategy pattern is the most direct match. Encapsulate each algorithm behind a common strategy interface and
select the needed strategy at runtime.

,Question 7. An implementation review highlights the following need: A third-party mapping SDK exposes
an API that does not match the location interface used by the rest of the app. Which change best satisfies
it?
A. Expose an application-level service interface and keep transport-specific request details in an implementation behind
it.
B. Wrap the SDK in an adapter that translates its API into the application-facing interface.
C. Move route selection and transition orchestration into a dedicated navigation coordinator or router.
D. Treat a local store as the immediate working source and synchronize changes with the server when connectivity
permits.

Correct Answer: B. Wrap the SDK in an adapter that translates its API into the application-facing interface.

Explanation: Wrap the SDK in an adapter that translates its API into the application-facing interface. Vendor-specific details
are isolated, so the rest of the code depends on the app contract rather than the external API.

Question 8. Why would Navigation coordinator or router be particularly valuable when Screen-transition
rules are duplicated across many views and are becoming difficult to test.?
A. Views focus on presenting content while navigation policy is centralized and testable.
B. Conflicting copies are eliminated and updates propagate from one authoritative representation.
C. Presentation behavior becomes testable without constructing the visual hierarchy, while the view remains relatively
thin.
D. The same application logic can run safely in multiple environments with auditable configuration differences.

Correct Answer: A. Views focus on presenting content while navigation policy is centralized and testable.

Explanation: Views focus on presenting content while navigation policy is centralized and testable. That is the primary value
of Navigation coordinator or router for the stated requirement.

Question 9. An implementation review highlights the following need: High-level use-case logic should
remain stable when the app changes from one storage technology to another. Which change best
satisfies it?
A. Supply the service dependency from outside the component instead of constructing the concrete client internally.
B. Make high-level logic depend on an abstraction that storage adapters implement, rather than on the concrete
database API.
C. Translate low-level failures at a boundary into stable application-level result or error categories.
D. Place domain policy in an inner layer and connect UI and data mechanisms through boundary interfaces and
adapters.

Correct Answer: B. Make high-level logic depend on an abstraction that storage adapters implement, rather than
on the concrete database API.

Explanation: Make high-level logic depend on an abstraction that storage adapters implement, rather than on the concrete
database API. Policy code is insulated from low-level implementation changes because both sides meet at a stable
abstraction.

, Question 10. Which verification activity best demonstrates that Cache-aside pattern has been
implemented effectively?
A. Substitute a fake repository in tests and verify that callers behave correctly without any network or database
dependency.
B. Disconnect the network, perform supported edits, reconnect, and verify that local work remains visible and later
synchronizes.
C. Exercise cache hit, miss, and expiration paths and verify that each path chooses the expected source.
D. Run the core test with in-memory fakes and confirm that no platform service is initialized.

Correct Answer: C. Exercise cache hit, miss, and expiration paths and verify that each path chooses the expected
source.

Explanation: Exercise cache hit, miss, and expiration paths and verify that each path chooses the expected source. This
directly validates the intended use of Cache-aside pattern; the other checks target different concerns.

Question 11. The team observes that Production URLs, test credentials, and flags are scattered as literals
throughout unrelated classes. Which principle or pattern is the clearest corrective direction?
A. Environment and configuration separation
B. Dependency injection
C. Cache-aside pattern
D. Layered or clean architecture

Correct Answer: A. Environment and configuration separation

Explanation: Environment and configuration separation is the most direct match. Inject environment-specific configuration
through a controlled configuration layer rather than hardcoding values in feature code.

Question 12. A team chooses Adapter pattern because A third-party mapping SDK exposes an API that
does not match the location interface used by the rest of the app. Which outcome best justifies that
choice?
A. Callers remain independent of HTTP client or protocol details and are easier to test.
B. Producers and consumers are decoupled in time and reference, allowing multiple observers to react to a state
change.
C. Independent behaviors can be combined and replaced without fragile superclass coupling.
D. Vendor-specific details are isolated, so the rest of the code depends on the app contract rather than the external API.

Correct Answer: D. Vendor-specific details are isolated, so the rest of the code depends on the app contract
rather than the external API.

Explanation: Vendor-specific details are isolated, so the rest of the code depends on the app contract rather than the external
API. That is the primary value of Adapter pattern for the stated requirement.

Document information

Uploaded on
October 10, 2026
Number of pages
32
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$15.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Favorgrades
3.8
(199)
Sold
854
Followers
377
Items
57829
Last sold
1 week ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions