MCQs / Computer Science / Course Project: Build a Modern Cloud App Step by Step

Course Project: Build a Modern Cloud App Step by Step MCQs — Computer Science

52 multiple-choice questions on Course Project: Build a Modern Cloud App Step by Step from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.

1. Why does AboutActivity override shouldOverrideUrlLoading?

  1. To block the page
  2. To cache the page
  3. To open mailto and web links in the right apps instead of inside the WebView
  4. To enable JavaScript

Answer: C) To open mailto and web links in the right apps instead of inside the WebView

Explanation: Returning true means the app handled the link.

Discuss this question

2. RegisterActivity sends the new email back to AuthActivity using:

  1. SharedPreferences only
  2. setResult(RESULTOK, Intent().putExtra("email", email))
  3. A global static variable
  4. A notification

Answer: B) setResult(RESULTOK, Intent().putExtra("email", email))

Explanation: Lab 4 – activity result with an extra.

Discuss this question

3. Why is the Delete button visible only on your own events?

  1. Because of dark mode
  2. Supabase hides other buttons
  3. event.userId is compared with Prefs.userId (and RLS enforces it on the server)
  4. It is random

Answer: C) event.userId is compared with Prefs.userId (and RLS enforces it on the server)

Explanation: The UI hides it; RLS is the real protection.

Discuss this question

4. Why do all project options use a record with a title, date/time, location and contact?

  1. Because RecyclerView needs four fields
  2. To make the APK smaller
  3. So every lab feature (countdown, map, location, call, SMS, email) fits any idea
  4. Because Supabase requires exactly these columns

Answer: C) So every lab feature (countdown, map, location, call, SMS, email) fits any idea

Explanation: The shared shape lets one set of steps work for every project idea.

Discuss this question

5. In the Feedback screen, the 10-second countdown gives the user:

  1. An undo window before the feedback is sent
  2. A delay to load the map
  3. Time to grant permissions
  4. A quiz timer

Answer: A) An undo window before the feedback is sent

Explanation: Lab 17 + Lab 13.

Discuss this question

6. Why is the countdown started in onStart() and cancelled in onStop()?

  1. onCreate cannot create timers
  2. To avoid internet use
  3. It runs only while the screen is visible, saving battery
  4. Timers only work in onStart

Answer: C) It runs only while the screen is visible, saving battery

Explanation: Lifecycle-aware work saves power.

Discuss this question

7. How is an Event passed from HomeFragment to EventDetailActivity?

  1. With a static variable
  2. Through a Supabase call
  3. As a JSON string extra created with Gson
  4. In a notification

Answer: C) As a JSON string extra created with Gson

Explanation: putExtra("event", Gson().toJson(e)) and fromJson on the other side.

Discuss this question

8. For a class project, switching off "Confirm email" means:

  1. Passwords are not needed
  2. RLS is disabled
  3. Emails are deleted
  4. New users can sign in immediately after registering

Answer: D) New users can sign in immediately after registering

Explanation: Otherwise users must confirm by email first.

Discuss this question

9. In the events table, userid has default auth.uid(). This means:

  1. Anonymous users own events
  2. The owner is filled from the signed-in user's token, so the app never sends it
  3. Every event belongs to the admin
  4. The id is random

Answer: B) The owner is filled from the signed-in user's token, so the app never sends it

Explanation: Nobody can post as someone else.

Discuss this question

10. Which CampusPulse policy stops users deleting other users' events?

  1. for insert with check (true)
  2. for delete to authenticated using (auth.uid() = userid)
  3. No policy is needed
  4. for select using (true)

Answer: B) for delete to authenticated using (auth.uid() = userid)

Explanation: Only matching rows can be deleted.

Discuss this question

11. Why must you keep the .jks key store file safe?

  1. It stores user data
  2. Every future update must be signed with the same key
  3. It is needed to run the emulator
  4. It contains the Supabase password

Answer: B) Every future update must be signed with the same key

Explanation: A lost key means you cannot publish updates.

Discuss this question

12. The avatar is shown as a circle by:

  1. RecyclerView
  2. A circular PNG only
  3. ShapeableImageView with a 50% corner-size shape overlay
  4. A WebView

Answer: C) ShapeableImageView with a 50% corner-size shape overlay

Explanation: Material shape theming.

Discuss this question

13. MaterialDatePicker returns the selected date as:

  1. A LocalDateTime in local time
  2. A String in dd/MM/yyyy
  3. UTC milliseconds at midnight
  4. Seconds since 2000

Answer: C) UTC milliseconds at midnight

Explanation: Convert with Instant.ofEpochMilli(...).atZone(ZoneOffset.UTC).toLocalDate().

Discuss this question

14. Before calling getCurrentLocation(), the app must:

  1. Show a notification
  2. Be signed in to Supabase
  3. Have internet permission only
  4. Have location permission granted at runtime

Answer: D) Have location permission granted at runtime

Explanation: Lab 15 – ACCESSFINE/COARSELOCATION runtime permission.

Discuss this question

15. Why does AddEventFragment override onSaveInstanceState?

  1. To keep the picked date, time and location when the phone rotates
  2. To upload the event
  3. To request permissions
  4. To clear the form

Answer: A) To keep the picked date, time and location when the phone rotates

Explanation: Plain variables are lost on configuration change unless saved.

Discuss this question

16. Which test proves the app handles network failures?

  1. Turn on airplane mode and refresh – a friendly message with Retry appears
  2. Uninstall the app
  3. Rotate the phone
  4. Change the font size

Answer: A) Turn on airplane mode and refresh – a friendly message with Retry appears

Explanation: Offline testing.

Discuss this question

17. For Google Play you normally upload:

  1. An .ipa file
  2. local.properties
  3. An Android App Bundle (.aab)
  4. The .jks file

Answer: C) An Android App Bundle (.aab)

Explanation: Play generates optimised APKs from the bundle.

Discuss this question

18. addEvent() returns the saved row because the request has:

  1. Prefer: return=representation
  2. select=
  3. @Query("id")
  4. order=startsat.asc

Answer: A) Prefer: return=representation

Explanation: Without it the insert returns an empty body.

Discuss this question

19. Prefs.darkMode stores the setting with:

  1. The WebView
  2. SharedPreferences
  3. A static variable only
  4. A Supabase table

Answer: B) SharedPreferences

Explanation: Lab 10 – small settings live in SharedPreferences.

Discuss this question

20. enableEdgeToEdge() with window insets lets the app:

  1. Draw behind the system bars while keeping content readable
  2. Run in split screen only
  3. Disable rotation
  4. Remove the status bar permanently

Answer: A) Draw behind the system bars while keeping content readable

Explanation: Insets add padding so the toolbar is not under the status bar.

Discuss this question

21. DateValidatorPointForward.now() in the date picker:

  1. Sets the time to now
  2. Saves the date to Supabase
  3. Stops the user picking past dates
  4. Opens the clock

Answer: C) Stops the user picking past dates

Explanation: Calendar constraints validate the selection.

Discuss this question

22. Why does AuthActivity call finish() after opening MainActivity?

  1. To clear the database
  2. So pressing Back does not return to the sign-in screen
  3. To rotate the screen
  4. To log the user out

Answer: B) So pressing Back does not return to the sign-in screen

Explanation: finish() removes the activity from the back stack.

Discuss this question

23. Why does the project use minimum SDK 26?

  1. Retrofit needs API 34
  2. Material 3 needs Android 14
  3. java.time works without extra setup and almost all phones support it
  4. Supabase only works on Android 8

Answer: C) java.time works without extra setup and almost all phones support it

Explanation: java.time is available natively from API 26.

Discuss this question

24. Which architecture describes CampusPulse?

  1. Peer-to-peer
  2. Mainframe batch
  3. Presentation (app) – logic (repository, RLS) – data (Supabase PostgreSQL)
  4. Single-tier desktop

Answer: C) Presentation (app) – logic (repository, RLS) – data (Supabase PostgreSQL)

Explanation: A three-tier cloud-connected app.

Discuss this question

25. deleteEvent sends @Query("id") with the value "eq.$id" because:

  1. Retrofit cannot send plain ids
  2. PostgREST filters use column=operator.value
  3. Supabase needs the word eq in every URL
  4. It encrypts the id

Answer: B) PostgREST filters use column=operator.value

Explanation: DELETE /rest/v1/events?id=eq.<id.

Discuss this question

Page 1 of 3 Next

Practise Course Project: Build a Modern Cloud App Step by Step MCQs

More Computer Science chapters