Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

FIT2081 EXAM PREP 2023

Rating
-
Sold
-
Pages
9
Grade
A+
Uploaded on
01-02-2024
Written in
2023/2024

FIT2081 EXAM PREP 2023 Which three methods are called when an app is launched and begins running? - ANSW 1. onCreate()2. onStart()3. onResume() What are the four states that an activity can be in as part of the Activity Lifecycle? - ANSW "Running, Paused, Stopped, and Destroyed." Why does are apps sometimes 'killed'? - ANSW Because it has been terminated (and removed from memory) because the operating system Which three methods are called when an app is launched and begins running? - ANSW 1. onCreate()2. onStart()3. onResume() What are the four states that an activity can be in as part of the Activity Lifecycle? - ANSW "Running, Paused, Stopped, and Destroyed." Why does are apps sometimes 'killed'? - ANSW Because it has been terminated (and removed from memory) because the operating system

Show more Read less
Institution
Course

Content preview

FIT2081 EXAM PREP 2023

Which three methods are called when an app is launched and begins running? - ANSW 1.
onCreate()2. onStart()3. onResume()

What are the four states that an activity can be in as part of the Activity Lifecycle? - ANSW
"Running, Paused, Stopped, and Destroyed."

Why does are apps sometimes 'killed'? - ANSW Because it has been terminated (and removed
from memory) because the operating system is attempting to reclaim memory for use by other
apps.

What is the difference between an an app that has been killed and an app that has been shut down
(or destroyed)? - ANSW "An app that has been killed has been removed from memory to
reallocate that memory to other apps. A apps that has been shut down has finished running, and
has called the the onPause(), onStop(), and onDestroy() methods prior to being destroyed."

What is the order of priority of the four states in the Activity Lifecycle? - ANSW 1. Running2.
Paused3. Stopped4. Destroyed(From highest to lowest priority.)

What is the purpose of an Implicit Intent? - ANSW "An Intent is an announcement to the
operating system of the intention to perform an action. Depending on the type of the action, the
operating system will determine the proper course of action. Intents are frequently used to launch
another Activity either in the same app or a different app."

What parameters does an Intent take? - ANSW "1. The current context.2. The class to transition
to.3. (Optional) User-supplied data, usually in the form of key-value pairs."

Which three methods are called when an app that is running is to be destroyed? - ANSW ```1.
onPause()(The app is no longer visible.)2. onStop()(The Activity is being disposed of by the
system.)3. onDestroy()```

What is an interface? - ANSW "An interface is a collection of abstract operations. Entities can
implement these interfaces and by doing so inherit their operations. This allows different entities
who implement the same interface to be substituted for one another.In Java, interfaces define
methods, and classes implement these interfaces, gaining the interface's methods, allowing
classes and objects that are unrelated in the inheritance hierarchy to be substituted for one
another."

What is downcasting? - ANSW Downcasting refers to the casting of a reference of an object of a
base class to that of one of its derived classes. I.e. superclass is casted to one of its subclasses.

, Is downcasting safe to do? - ANSW It is when the reference is being cast to one of its
subclasses.

What is polymorphism? - ANSW Polymorphism refers to the ability to handle different data
types using the a uniform interface.

What types of polymorphism does Java support? - ANSW "Java supports method overloading,
method overriding, and generics (parametric polymorphism)."

What is method overriding? - ANSW Method overriding occurs when a child class implements
its own version of a previously implemented method in its parent class. This allows a child class
to perform the same operation as its parent class but in a different way.

What is method overloading? - ANSW "Method overloading occurs when a single method name
has multiple headers, each taking a different number and types of arguments. This allows a
single method name to handle different parameters."

What are Java generics? - ANSW Generics is an implementation of parametric polymorphism. It
allows a class or interfaces to take a type as a parameter so that the class can be made to handle
different types without creating a different class or different sets of methods for each different
data type.

What is the function of a listener in Android? - ANSW "A listener encapsulates code to be
executed in response to an event. Listeners are not immutably coupled to events, they in fact
allow code to be executed to be decoupled from events."

How are Android listeners implemented in Java? - ANSW A listener is implemented as either a
Java interface or an adapter class. They both define methods that are called in response to events.

How is a listener typically used to react to user interface interaction? - ANSW "A listener is
created either by having a class implement a listener interface or creating a class that extends a
listener adapter, then registering that listener with the appropriate view."

What is the primary difference between a listener interface and a listener adaptor? - ANSW
"Listener interfaces are Java interfaces and consequently allow a class to implement many
different listeners, but must implement all of their methods.A listener adaptor is a Java class and
consequently only allows a class to inherit one listener adaptor class (or any other class for that
matter). The benefit of using a listener adaptor is being able to only override the method(s) one
desires."

Why should one use an interface instead of a class? - ANSW "A class can implement a number
of interfaces in Java, whereas they can only extend one parent class. Interfaces allow unrelated
classes to be treated the same way without creating a complex and inefficient inheritance tree."

What is a TableLayout? - ANSW "A TableLayout is a view layout that arranges its child views
into rows and columns. It contains a number of TableRow objects, one for each row."

Written for

Course

Document information

Uploaded on
February 1, 2024
Number of pages
9
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$11.09
Get access to the full document:

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

Get to know the seller
Seller avatar
Certifiedacademics

Also available in package deal

Get to know the seller

Seller avatar
Certifiedacademics Chamberlain College Of Nursing
Follow You need to be logged in order to follow users or courses
Sold
3
Member since
2 year
Number of followers
1
Documents
327
Last sold
1 month ago
Online library

Get all your study sets here from exam elaboration, thesis to homeworks.

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

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