• 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 3 out of 23 pages
Exam (elaborations)

Cse 335 Final Exam Review Questions With Answers And Explanations

Document preview thumbnail
Preview 3 out of 23 pages

Cse 335 Final Exam Review Questions With Answers And Explanations

Content preview

CSE 335 FINAL EXAM REVIEW QUESTIONS
WITH ANSWERS AND EXPLANATIONS
1. Before release, engineers evaluate the following requirement: An asynchronous helper reports
completion
through a callback block. Which decision is most defensible?
A. A closure
B. A module import
C. A build scheme
D. A property wrapper
Correct Answer: A. A closure
Explanation: Closures are executable blocks that can be passed around and invoked later,
making them useful for callbacks and
higher-order operations.
2. A comprehensive review asks how the team should handle this production-oriented case: The
server returns 404
and a JSON error object instead of the requested resource. What is the best answer?
A. Treat any received bytes as a successful request
B. Assume a non-nil URL means the operation succeeded
C. Check the HTTP response status separately from transport success
D. Decode every error page as the expected model
Correct Answer: C. Check the HTTP response status separately from transport success
Explanation: A network request can complete at the transport layer while the server still returns
an HTTP error status.
3. Before release, engineers evaluate the following requirement: Reference data changes
infrequently and can be
cached with a known expiration policy. Which decision is most defensible?
A. Cache forever with no invalidation rule
B. Cache data with an explicit freshness policy
C. Use the current view hierarchy as the cache
D. Refetch every resource on every render
Correct Answer: B. Cache data with an explicit freshness policy
Explanation: A cache should define when stored data is valid and when it must be refreshed to
balance performance and correctness.
4. A comprehensive review asks how the team should handle this production-oriented case:
Several response
models share the same server date representation and should decode it uniformly. What is the
best answer?
A. Configure a JSON date decoding strategy
B. Assume every date string is already a Date
C. Store timestamps as display-formatted strings in the domain model
D. Parse all dates by taking arbitrary substrings
Correct Answer: A. Configure a JSON date decoding strategy
Explanation: JSONDecoder date strategies provide a consistent way to decode known date
representations into Date values.

,5. During a final review, a release-readiness discussion raises this issue: An authentication result
can be
signedOut, signingIn, or signedIn with user data. Which response best preserves correctness and
maintainability?
A. A raw unstructured string everywhere
B. A duplicated Boolean pair
C. A floating-point value
D. An enum
Correct Answer: D. An enum
Explanation: Enums model a finite set of related states and can attach associated data when
needed.
6. A comprehensive review asks how the team should handle this production-oriented case: An
asynchronous
repository completes and the view model updates an error message. What is the best answer?
A. Mutate UI state from an arbitrary background context
B. Store every UI value in UserDefaults
C. Update UI-observed state on the main actor
D. Disable concurrency entirely
Correct Answer: C. Update UI-observed state on the main actor
Explanation: UI-facing state should be mutated on the main actor to preserve thread-safety
expectations of the UI framework.
7. A comprehensive review asks how the team should handle this production-oriented case: A
shared token-refresh
coordinator must prevent simultaneous mutation of its internal state. What is the best answer?
A. Store all shared values in independent views
B. Use an actor to protect shared mutable state
C. Rely on random timing to avoid races
D. Expose mutable state globally with no synchronization
Correct Answer: B. Use an actor to protect shared mutable state
Explanation: Actors serialize access to their isolated mutable state and are useful for
concurrency-safe shared resources.
8. During a final review, a release-readiness discussion raises this issue: The app must upload a
request body to a
web API. Which response best preserves correctness and maintainability?
A. AVAudioSession
B. URLSession
C. CoreLocation
D. UserDefaults
Correct Answer: B. URLSession
Explanation: URLSession is the standard networking API for HTTP requests and data tasks.
9. Before release, engineers evaluate the following requirement: The selected filter is reflected in
a toolbar, list, and
settings panel. Which decision is most defensible?
A. A single source of truth
B. Copy the same mutable value into several independent @State properties
C. Store a second editable copy in every child view
D. Recompute the value from unrelated global variables
Correct Answer: A. A single source of truth
Explanation: SwiftUI data flow is most reliable when one owner holds mutable state and
dependent views derive or bind to it.

, 10. A final-exam review integrates several mobile-development concerns. In this case, A request
succeeds at the
transport layer but returns 404. Which option should the team select?
A. Force-unwrap the decoded model
B. Ignore transport errors and decoding errors
C. Assume any received bytes mean success
D. Check the HTTP status code and handle failure paths
Correct Answer: D. Check the HTTP status code and handle failure paths
Explanation: Robust networking distinguishes transport, HTTP, and decoding failures rather than
assuming all responses are
successful.
11. A final-exam review integrates several mobile-development concerns. In this case, A loading
indicator should
overlay existing content. Which option should the team select?
A. VStack
B. HStack
C. ZStack
D. List
Correct Answer: C. ZStack
Explanation: ZStack overlays children along the depth axis.
12. During a final review, a release-readiness discussion raises this issue: An export upload can
take minutes and
should survive ordinary app suspension. Which response best preserves correctness and
maintainability?
A. Spin in a loop until the upload finishes
B. Disable app suspension globally
C. Keep the foreground view alive indefinitely
D. Use a background URLSession configuration for long transfers that should continue
Correct Answer: D. Use a background URLSession configuration for long transfers that should
continue
Explanation: Background URLSession supports suitable transfers that may continue when the
app is suspended and be reconnected to
later.
13. A comprehensive review asks how the team should handle this production-oriented case:
Several screens need
the same locale-dependent setting without passing it through every intermediate view. What is
the best answer?
A. @State
B. @Binding
C. @Environment
D. A global singleton accessed directly
Correct Answer: C. @Environment
Explanation: Environment values support dependency propagation through the SwiftUI hierarchy
without manually threading every
value through each initializer.

Document information

Uploaded on
October 10, 2026
Number of pages
23
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