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
Document preview thumbnail
Preview 3 out of 27 pages
Exam (elaborations)

CSE 3901 FINAL – RAILS PRACTICE EXAMINATION 2026 QUESTIONS WITH ANSWERS GRADED A+

Document preview thumbnail
Preview 3 out of 27 pages

CSE 3901 FINAL – RAILS PRACTICE EXAMINATION 2026 QUESTIONS WITH ANSWERS GRADED A+

Content preview

CSE 3901 FINAL – RAILS PRACTICE
EXAMINATION 2026 QUESTIONS
WITH ANSWERS GRADED A+

◍ what happens when a variable is passed into a method?.
Answer: the method won't change the actual variable (it works with a copy
of the variable)-an instance method is needed to change the actual variable
◍ Activity.
Answer: an entry point into the application responsible for managing user
interaction with a screen of information
◍ the only things that should have recursive calls with while-loops inside
are....
Answer: certain types of parsers or things that navigate "general trees" not
binary trees
◍ Layout.
Answer: defines a set of UI objects and the objects' positions on the screen.
Made up of definitions written in XML. Each definition is used to create an
object that appears onscreen.
◍ ReverseDNS.
Answer: the package name convention, where the domain name of the
organization is reversed and suffixed with further identifiers. This keeps
package names unique and distinguishes applications from each other in the
google play store
◍ lateinit.
Answer: indicates to the compiler that you will provide a non-null value
before you attempt to use the contents of the property

,◍ Toast.
Answer: a short message that informs the user of something but does not
require input or action
◍ A hashing function must always return the same....
Answer: output value for a given input value
◍ R class.
Answer: during compilation, the build tools generate the R class that
contains the list of IDs as integer constants, allowing access to resources in
the application
◍ A hashing function must....
Answer: not have any preconditions
◍ Hashing functions may....
Answer: return negative values
◍ How does wiring up views work here before we introduce ViewBinding?.
Answer: Before ViewBinding, to wire up views we get the reference to the
inflated View objects and set listeners on those objects to respond to user
actions
◍ How does wiring up work using ViewBinding?.
Answer: We have to call inflate, passing in the layoutinflater and assigning
our binding to the value. Layout Inflater is responsible for inflating XML
layouts into UI elements. We also have to call setContentView with the
reference to the root UI element in the layout We can now add listeners to
the elements within the bindingCode:binding =
ActivityMainBinding.inflate(layoutInflater)setContentView(binding.root)
◍ define px, dp, sp, mm, in,.....
Answer: px - stands for pixel. A unit of screen space. Does not scale
properly for different display densities, not recommendedDp -
density-independent pixel, used for margins, padding, or anything else with
a specific pixel value. Scales with the screen sizeSp - scale-independent
pixel, density independent pixels that take into account font size

, preferences. We use these for text sizept, mm, in - scaled units that have
specific sizes, not recommended
◍ Activity lifecycle table.
Answer: Columns = {In memory?, visible to user?, in
foreground?}Nonexistent - no, no, nocreated - yes, no, nostarted - yes,
yes/partially, noresumed - yes, yes, yes
◍ When a hashing algorithm is applied to a map....
Answer: hash the keys, NOT the values
◍ Stages of lifecycle explained.
Answer: Nonexistent - app has not been launched yet, or app was destroyed.
There is no instance in memoryCreated - represents an activity that has an
instance in memory but is not visible on screen. Occurs when the app first
renders and when the view is fully out of viewStarted - represents an activity
that has lost focus but whose view is visible or partially visible. For
instance, if there was a transparent activity on top or if in multi window
modeResumed - represents an activity that is in memory, fully visible, and
in the foreground. The user interacts with this state
◍ Given a non-empty heap with all distinct integer entries and total preorder ≤,
the smallest element is at the root. The largest element....
Answer: has to be a leaf node.
◍ In a non-empty binary search tree with all distinct integer entries and total
preorder ≤, the node of the largest element....
Answer: has no right child
◍ Rotation and the activity lifecycle.
Answer: Activities are destroyed and recreated on configuration changes,
such as rotation. That is why we need to store data in a viewmodel which
has a simpler lifecycle, so it persists on configuration changes.
◍ Create log functions using logcat to monitor the activity lifecycle.
Answer: private const val TAG = "ActivityName"Log.d(TAG, "msg")We
can use $ to pull in a specific valuewe can override the lifecycle functions

Document information

Uploaded on
June 28, 2026
Number of pages
27
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$13.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.
FocusFile7
3.9
(24)
Sold
228
Followers
3
Items
57374
Last sold
4 hours 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