100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Android How To Program 3rd Edition By Deitel & Deitel – Test Bank $14.49   Add to cart

Exam (elaborations)

Android How To Program 3rd Edition By Deitel & Deitel – Test Bank

 2 views  0 purchase
  • Course
  • Institution

Android How To Program 3rd Edition By Deitel & Deitel – Test Bank – Sample Test Chapter 6 Cannon Game App • Introduction No questions. • Test-Driving the Cannon Game App No questions. • Technologies Overview No questions. • Using the Resource Folder res/raw Q1. Media files (su...

[Show more]

Preview 3 out of 28  pages

  • March 1, 2022
  • 28
  • 2022/2023
  • Exam (elaborations)
  • Questions & answers
avatar-seller
Android How To Program 3rd Edition By Deitel
& Deitel – Test Bank
– Sample
Test

Chapter 6 Cannon Game App

• Introducti
on No
questions.

• Test-Driving the Cannon Game
App No questions.

• Technologies
Overview No questions.

• Using the Resource Folder res/raw

,Q1. Media files (such as the sounds we used in the Cannon Game
app), are placed in the app’s resource folder .

1. res/media
2. res/sounds
3. res/raw
4. res/

multimedia

Answer: c.

res/raw

• Activity and Fragment Lifecycle Methods

Q1. Which of the following statements is false?

1. When an Activity is shut down, its onDestroy method is
called, which in turn calls the onDestroy methods of all the
Fragments hosted by the Activity.
2. We used the onDestroy method in the MainActivityFragment
to release the CannonView’s sound resources.
3. Method onDestroy is guaranteed to be called, so it can be
used to release resources and to save critical data.
4. The Android documentation recommends that you save data in
methods onPause or onSaveInstanceState.

Answer: c. Method onDestroy is guaranteed to be called, so it can be
used to release resources and to save critical data. Actually, method
onDestroy is not guaranteed to be called, so it should be used only to
release resources, not to save critical data.

• Overriding View Method onTouchEvent
Q1. To process simple touch events in an app, override View
method onTouchEvent, then use constants from class (package
android.view) to test which type of event occurred and process it
accordingly.

1. Event
2. MotionEvent
3. Motion
4. View

Answer: b. MotionEvent

, • Adding Sound with SoundPool and AudioManager
Q1. An app’s sound effects are managed with a(n)

(package android.media), which can be used to load, play and
unload sounds.

1. Effects
2. SoundPool
3. EffectsPool
4. SoundManag

er Answer:

SoundPool


Q2. Sounds are played using one of Android’s audio- for
alarms, music, notifications, phone rings, system sounds, phone
calls and more.

1. streams
2. players
3. tools
4. None of the

above Answer: a.

streams


Q3. The Android documentation recommends that games use the
to play sounds, because that stream’s volume can be controlled
via the device’s volume buttons.

1. phone audio stream
2. alarm audio stream
3. notifications audio stream
4. music audio stream

Answer: d. music audio

stream


Q4. Which of the following statements is false?

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller NURSEREP. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $14.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

78140 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$14.49
  • (0)
  Add to cart