Geophysics_nonsatirical_maid-in-waiting
.docx
keyboard_arrow_up
School
Northern Virginia Community College *
*We aren’t endorsed by this school
Course
220
Subject
Computer Science
Date
Feb 20, 2024
Type
docx
Pages
2
Uploaded by DoctorSnakePerson1077
Question: When is the onStop() method invoked?
Answer: A call to onStop method happens when an activity is no longer visible to the user, either because another activity has taken over or if in front of that activity.
Question: Differentiate Activities from Services.
Answer: Activities can be closed, or terminated anytime the user wishes. On the other hand, services are designed to run behind the scenes, and can act independently. Most services run continuously, regardless of whether there are certain or no activities being executed.
Question: What is AIDL?
Answer: AIDL, or Android Interface Definition Language, handles the interface requirements between a client and a service so both can communicate at the same level through interprocess communication or IPC. This process involves breaking down objects into primitives that Android can understand. This part is required simply because a process cannot access the memory of the other process.
Question: What is a visible activity?
Answer: A visible activity is one that sits behind a foreground dialog. It is actually visible to the user, but not necessarily being in the foreground itself.
Question: When does ANR occur?
Answer: The ANR dialog is displayed to the user based on two possible conditions. One is when there is no response to an input event within 5 seconds, and the other is when a broadcast receiver is not done executing within 10 seconds.
Question: What is the function of an intent filter?
Answer: Because every component needs to indicate which intents they can respond to, intent filters are used to filter out intents that these components are willing to receive. One or more intent filters are possible, depending on the services and activities that are going to
make use of it.
Question: Is there a case wherein other qualifiers in multiple resources take precedence over locale?
Answer: Yes, there are actually instances wherein some qualifiers can take precedence over locale. There are two known exceptions, which are the MCC (mobile country code) and MNC
(mobile network code) qualifiers.
Question: What role does Dalvik play in Android development?
Answer: Dalvik serves as a virtual machine, and it is where every Android application runs. Through Dalvik, a device is able to execute multiple virtual machines efficiently through better memory management.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
The last callback in the lifecycle of an activity is onDestroy(). The system calls this method on your activity as the final signal that your activity instance is completely removed from the system memory. Usually, the system will call onPause() and onStop() before calling onDestroy(). Describe a scenario, though, where onPause() and onStop() would not be invoked.
arrow_forward
Get familiar with access control classes. Compare and analyse the various controls each choice offers.
arrow_forward
Match the design pattern with its description
A class that acts as a stand-
in for another class. Allows
you to enhance some
functionality while
delegating the main
functionality to a (concrete)
Subject.
Provide the interface you
want to provide for your
client. Useful for hiding
implementation details
from your code base (e.g. if
you're using a third-party
library).
1. Null Object
2. Proxy
3. Decorator
An object that will do
nothing that is used in lieu
of an uninstantiated value
to prevent errors in code.
4. Adapter
A way of enhancing other
classes that implement the
same interface. Adds
functionality while
delegating to an (abstract)
Subject.
arrow_forward
Clarify what overriding a method entails and how it differs from overloading.
arrow_forward
Design a javafx GUI for Tasks Management.
The Task data is: id, title, status, added by, creation date.
Do the following:
Add Task manually and from a file.
View Tasks.
Find All Tasks titles that added by “Ali" sorted by id.
Find the top four tasks sorted by creation date.
Find all tasks that start with the letter 'a' and have exactly seven letters (ignore letter 'a' case).
Find who added the largest number of tasks.
Find the number of tasks that are closed and open.
Count the tasks that added by "Sami".
arrow_forward
Given an application program where it shares a variable X for its tasks' execution, one of the
program tasks calls Add method to add value to the variable X. Before the new value of X is
saved, another task of the program calls Subtract method to subtract value from the shared
variable X. This can cause race condition and arrive incorrect value of the shared variable X.
Discover and explain what can be added to this application program in order to prevent race
condition from occurring.
arrow_forward
A use case description is generic with few details. For this reason it does not contain numbered steps and alternatives to those
steps. That is the kind of information contained in a user story.
O True
O False
arrow_forward
URGENT!!
In control task1...
one
2nd
Check in task2...
3
4
In control task1...
5
6
Check in task2...
7
8
In control task1...
9
10
Transaction completed
Check in task2...
Transaction completed
Above is the two tasks (tasks) working in sequence and printing the numbers from 1 to 10 on the screen. These tasks are two Java classes named task1 and task2 and they are connected to two different threads. These tasks alternately call the method named artir() of an object created from a class named “artis”, that is, writing the numbers to the console is done by the method named artir() in the “artis” class. You can design the parameters and return value of the artir() method as you wish. The creation of the "artis" class object, tasks and threads is seen in the following snippet.
public class Final_question1 {
public static void main(String[] args) {
increment a = new increment(1, 2, 10);
//Each task will print 2 numbers in order in the range of 1-10
task1 g1 = new task1(a);
task2 g2 = new…
arrow_forward
1. Explain why the operation handleMessagefromServer() appears in both ObservableClient and AdaptableClient classes. Are they concrete or abstract?
2. If we want the system give a signal to the client when a message from the server is received, what should the program do? Indicate what methods will be used to implement your idea.
3. Indicate the advantages of using the Observable pattern and Adapterpattern in this design.
arrow_forward
A method for validating the username and password. The algorithm is capable of the following:
The user has three chances; if the username and password match, the user is logged in; otherwise, the user's display account is locked.
Assume that a list of usernames and their associated passwords exists. Each time a user enters an incorrect credential, the system should indicate what went wrong (i.e. User does not exist, or Incorrect password)
arrow_forward
16. Create a sequence diagram for the following collaboration. Use the classes and methods on
the diagram.
A customer wants to draw money from his bank account. He enters his card into an ATM
(automated teller machine). The ATM machine prompts Enter PIN. The customer enters
his PIN. The ATM (internally) retrieves the bank account number from the card. The ATM
encrypts the PIN and the account number and sends it over to the bank. The bank verifies the
encrypted Account and PIN number. If the PIN number is correct, the ATM displays ,,Enter
amount", draws money from the bank account and pays out the amount.
arrow_forward
When implementing an interface, why do you need to implement every single method in the interface?
arrow_forward
While using an interface, how do you benefit?Why not just make instances of the relevant classes directly instead of utilizing them?
arrow_forward
Design and implement a java program for the above class diagram. Here, you haveto calculate the compound interest for saving accounts (3.2% per year). As youknow, the user should not be able to withdraw money from a savings account but canwithdraw from the current account. The user should maintain a threshold in the currentaccount. If it goes below, the bank will charge some penalty. The tasks area. User can deposit, update, display the balance from both accounts (Savingsand current)b. Calculate interest and sum to savings accountc. Allow to withdraw only in current and goes below some level, charge apenalty
arrow_forward
The keyword ……………………... used at method declaration to specify that the method returns an integer value in a minimum domain range .
arrow_forward
Looking for advice /review on my code to see if I am missing any steps from the task, missing any code or made an error, and if so what? Task found below along with my written code. (Python)#Write Hereclass Wages:#Declare Methods def __init__(self, name, hours, wages): self.name = name self.hours = hours self.wages = wages #Determine Name def getName(self): self.name = str(input("Enter employee's name: ")) return self.name#Validate Weekly Hours def getHours(self): while True: try: self.hours = int(input("Enter number of hours worked: ")) if self.hours <= 0: print("Value must be a number greater than 0!") continue except EOFError: continue else: return self.hours#Validte Hourly Wage def getWage(self): while True: try: self.wages = int(input("Enter your hourly wage:…
arrow_forward
How does a user gain from interfaces?Why not just make instances of the relevant classes directly instead of utilizing them?
arrow_forward
3
DO NOT COPY FROM OTHER WEBSITES
Upvote guarenteed for a correct and detailed answer. Thank you!!!
arrow_forward
Making claims that fail Debug the programme.The issue: Normally, a failed assert only produces a message and causes the application to crash. Finding flaws with this is not really helpful. If a failed assert could launch the debugger, it would be much better.
arrow_forward
Refer to image
arrow_forward
Activity 2: Draw a Object state diagram for a washing machine based on the given specification.
[When a washing machine is running it will progress from Washing through Rinsing to Spinning. If there is a
power cut, the washing machine will stop running and will go to the Power Off state. Then when the power is
restored, the Running state is entered at the History State symbol meaning that it should resume where it last
left-off]
arrow_forward
.What are the benefits of using a method?
arrow_forward
True or False?
A composition association relationship connects a Student class with a Schedule class, which means that if you remove the student, the schedule is also removed.
arrow_forward
Design for the user without considering their interface. Create a catalog of the top methods.
arrow_forward
Draw
Design
Layout
References
Mailings
Review
View
Help
Create a Java program and name your file: FIRSTNAME. java (for example, lohn.java).
Work on the following:
Create three interfaces with the names "InterfaceOne," "IrnterfaceTwo," and "Interfacelhree"
In the first interface, declare a method (signature only) with a name "updateGear()."
In the second interface, dedare a method (signature only) with a name "accelerate()."
In the third interface, dedare a method (signature only) with a name "pusherake()."
Create two classes Car and Truck that implement these three interfaces at one time. Define a
new method "currentSpeed()" in both the classes to find the current speed after the brake.
• Define all the three methods inside each class. The data to these methods will be provided
during the object creation.
Invoke the two objects with a name c1 of class Car and t1 of class Truck.
• After creating the objects, call all the three methods defined above in both the classes.
Pass any of the…
arrow_forward
Why is it necessary to implement all of the methods defined by an interface?
arrow_forward
Consider the sequence diagram below.
List the classes represented in this sequence diagram.
Below or beside each class, list the methods needed to be supported by that class.
For example, if one of the classes was named Sprayer and had methods trigger and fill.
Sprayer: trigger, fill
placeapp
printer
intapp
getready
status
print
print
placeapp
printer
intapp
arrow_forward
Objective:
Write a class that will test dates and times inputted by the user and determine whether or not it is valid. This will focus on the usages of methods to organize code.
First download the driver and put it in your project
DO NOT ALTER THE DRIVER!
Use this to run your project
The driver :
public class DateAndTimeDriver { public static void main(String[] args) { // TODO Auto-generated method stub DateAndTimeTester dtTester = new DateAndTimeTester(); dtTester.run(); } }
Write a class file called DateAndTimeTester
This DOES NOT have a main method
Create the following methods
run: This method returns nothing and takes no parameters. This is called by the driver and should handle all of the input from the Scanner and dialog for the user.
isValid: returns true or false if a given String has the correct date and time. The String parameter should be formatted “MM/DD hh:mm” This method should call the methods isValidDate and isValidTime to determine this.
isValidDate: returns…
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Related Questions
- The last callback in the lifecycle of an activity is onDestroy(). The system calls this method on your activity as the final signal that your activity instance is completely removed from the system memory. Usually, the system will call onPause() and onStop() before calling onDestroy(). Describe a scenario, though, where onPause() and onStop() would not be invoked.arrow_forwardGet familiar with access control classes. Compare and analyse the various controls each choice offers.arrow_forwardMatch the design pattern with its description A class that acts as a stand- in for another class. Allows you to enhance some functionality while delegating the main functionality to a (concrete) Subject. Provide the interface you want to provide for your client. Useful for hiding implementation details from your code base (e.g. if you're using a third-party library). 1. Null Object 2. Proxy 3. Decorator An object that will do nothing that is used in lieu of an uninstantiated value to prevent errors in code. 4. Adapter A way of enhancing other classes that implement the same interface. Adds functionality while delegating to an (abstract) Subject.arrow_forward
- Clarify what overriding a method entails and how it differs from overloading.arrow_forwardDesign a javafx GUI for Tasks Management. The Task data is: id, title, status, added by, creation date. Do the following: Add Task manually and from a file. View Tasks. Find All Tasks titles that added by “Ali" sorted by id. Find the top four tasks sorted by creation date. Find all tasks that start with the letter 'a' and have exactly seven letters (ignore letter 'a' case). Find who added the largest number of tasks. Find the number of tasks that are closed and open. Count the tasks that added by "Sami".arrow_forwardGiven an application program where it shares a variable X for its tasks' execution, one of the program tasks calls Add method to add value to the variable X. Before the new value of X is saved, another task of the program calls Subtract method to subtract value from the shared variable X. This can cause race condition and arrive incorrect value of the shared variable X. Discover and explain what can be added to this application program in order to prevent race condition from occurring.arrow_forward
- A use case description is generic with few details. For this reason it does not contain numbered steps and alternatives to those steps. That is the kind of information contained in a user story. O True O Falsearrow_forwardURGENT!! In control task1... one 2nd Check in task2... 3 4 In control task1... 5 6 Check in task2... 7 8 In control task1... 9 10 Transaction completed Check in task2... Transaction completed Above is the two tasks (tasks) working in sequence and printing the numbers from 1 to 10 on the screen. These tasks are two Java classes named task1 and task2 and they are connected to two different threads. These tasks alternately call the method named artir() of an object created from a class named “artis”, that is, writing the numbers to the console is done by the method named artir() in the “artis” class. You can design the parameters and return value of the artir() method as you wish. The creation of the "artis" class object, tasks and threads is seen in the following snippet. public class Final_question1 { public static void main(String[] args) { increment a = new increment(1, 2, 10); //Each task will print 2 numbers in order in the range of 1-10 task1 g1 = new task1(a); task2 g2 = new…arrow_forward1. Explain why the operation handleMessagefromServer() appears in both ObservableClient and AdaptableClient classes. Are they concrete or abstract? 2. If we want the system give a signal to the client when a message from the server is received, what should the program do? Indicate what methods will be used to implement your idea. 3. Indicate the advantages of using the Observable pattern and Adapterpattern in this design.arrow_forward
- A method for validating the username and password. The algorithm is capable of the following: The user has three chances; if the username and password match, the user is logged in; otherwise, the user's display account is locked. Assume that a list of usernames and their associated passwords exists. Each time a user enters an incorrect credential, the system should indicate what went wrong (i.e. User does not exist, or Incorrect password)arrow_forward16. Create a sequence diagram for the following collaboration. Use the classes and methods on the diagram. A customer wants to draw money from his bank account. He enters his card into an ATM (automated teller machine). The ATM machine prompts Enter PIN. The customer enters his PIN. The ATM (internally) retrieves the bank account number from the card. The ATM encrypts the PIN and the account number and sends it over to the bank. The bank verifies the encrypted Account and PIN number. If the PIN number is correct, the ATM displays ,,Enter amount", draws money from the bank account and pays out the amount.arrow_forwardWhen implementing an interface, why do you need to implement every single method in the interface?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you