Final Exam in Android Programming

Embed Size (px)

Citation preview

  • 7/28/2019 Final Exam in Android Programming

    1/10

    MULTIPLE CHOICE. Choose the best answer.

    1. Android is licensed under which open source licensing license?A. Gnu's GPLB. Apache/MIT

    C. OSSD. SourceforgeAns: B

    2. Although most people's first thought when they think of Android is Google, Android is notactually owned by Google. Who owns the Android platform?A. Oracle TechnologyB. DalvikC. Open Handset AllianceD. The above statement is and Android is owned by GoogleAns: C

    3. Although most people's first thought when they think of Android is Google, Android is notactually owned by Google. Who owns the Android platform?A. Oracle TechnologyB. DalvikC. Open Handset AllianceD. The above statement is and Android is owned by GoogleAns: C

    4. What was Google's main business motivation for supporting Android?A. To level the playing field for mobile devices

    B. To directly compete with the iPhoneC. To corner the mobile device application market for licensing purposesD. To allow them to advertise moreAns: D

    5. What was the first phone released that ran the Android OS?A. Google gPhoneB. T-Mobile G1C. Motorola DroidD. HTC HeroAns: B

    6. From a phone manufacturer's point of view, what makes Android so great?A. Aside from some specific drivers, it provides everything to make a phone workB. It makes the hardware work betterC. It allows them to compete with Apple's iPhoneD. It allows users to create apps, generating revenue for the companiesAns: A

    http://www.atoziq.com/2012/08/from-phone-manufacturers-point-of-view.htmlhttp://www.atoziq.com/2012/08/from-phone-manufacturers-point-of-view.html
  • 7/28/2019 Final Exam in Android Programming

    2/10

    7. What is a funny fact about the start of Android? A. It was originally going to be called UFOB. The first version of Android was released without an actual phone on the market

    C. Androids main purpose was to unlock your car door when you left the keys inside of it.D. Was going to be a closed source application to make more money for its company.Ans: B

    8. Which of the following is NOT a state in the lifecycle of a service?A. StartingB. RunningC. DestroyedD. PausedAns: D

    9. What file is responsible for glueing everthing together , explaining what the applicatin consistsof, what its main building blocks are, ext...?A. Layout fileB. Strings XMLC. R fileD. Manifest fileAns: D

    10. When an activity doesn't exist in memory it is inA. Starting stateB. Running stateC. Loading stateD. Inexistent state.Ans: A

    11. What is an Activity?A. A single screen the user sees on the device at one timeB. A message sent among the major building blocksC. A component that runs in the background without any interface.D. Context referring to the application environment.

    Ans: A

    12. The XML file that contains all the text that your application uses.A. stack.xmlB. text.xmlC. strings.xmlD. string.java

    Ans: C

    http://www.atoziq.com/2012/08/what-is-funny-fact-about-start-of.htmlhttp://www.atoziq.com/2012/08/what-is-funny-fact-about-start-of.htmlhttp://www.atoziq.com/2012/08/what-is-funny-fact-about-start-of.html
  • 7/28/2019 Final Exam in Android Programming

    3/10

    13. Which of the following are not a component of an APK file?A. Resources

    B. All of these are components of the APKC. Native LibrariesD. Dalvik executableAns: B

    14. The R file is a(an) generated file that is generatedA. AutomaticallyB. ManuallyC. EmulatedD. None of the aboveAns: A

    15. What was the main reason for replacing the Java VM with the Dalvik VM when the projectbegan?

    A. There was not enough memory capabilityB. Java virtual machine was not freeC. Java VM was too complicated to configureD. Java VM ran too slowAns: B

    16. When developing for the Android OS, Java byte code is compiled into what?A. Java source codeB. Dalvik application codeC. Dalvik byte codeD. C source codeAns: C

    17. What is the name of the program that converts Java byte code into Dalvik byte code?A. Android Interpretive Compiler (AIC)B. Dalvik ConverterC. Dex compilerD. Mobile Interpretive Compiler (MIC)Ans: C

    18. To create an emulator, you need an AVD. What does it stand for?A. Android Virtual DisplayB. Android Virtual DeviceC. Active Virtual DeviceD. Application Virtual DisplayAns: B

  • 7/28/2019 Final Exam in Android Programming

    4/10

    19. The ___________ file specifies the layout of your screen.

    A. Layout fileB. Manifest fileC. Strings XMLD. R fileAns: A

    20. An activity can be thought of as corresponding to what?

    A. A Java projectB. A Java classC. A method callD. An object field

    Ans: B

    21. What is the driving force behind an Android application and that ultimately gets converted into aDalvik executable?

    A. Java source code.B. R-file.C. the emulator.D. the SDKAns: A

    22. Which of the following is the most "resource hungry" part of dealing with Activities on AndroidA. Closing an appB. Suspending an appC. Opening a new appD. Restoring the most recent appAns: C

    23. What runs in the background and doesn't have any UI components?

    A. IntentsB. Content ProvidersC. ServicesD. ApplicationsAns: C

    24. What built-in database is Android shipped with?

    A. SQLiteB. ApacheC. MySQLD. OracleAns: A

  • 7/28/2019 Final Exam in Android Programming

    5/10

    25. Creating a UI (User Interface) in Android requires careful use of...

    A. Java and SQLB. XML and JavaC. XML and C++

    D. DreamweaverAns: B

    26. If the UI begins to behave sluggishly or crash while making network calls, this is likely due to...A. Network latencyB. Hardware malfunctionsC. Virus on the ServerD. Activity manager contains too much.Ans: A

    27. Which of the following is NOT an activity we will be creating for the YAMBA project?

    A. Preferences ActivityB. Update ActivityC. Timeline ActivityD. Status ActivityAns: B

    28. What part of the Android platform is open source?A. low-level Linux modulesB. all of these answers #The entire stack is an open source platformC. native librariesD. application frame work

    Ans: B

    29. Which one is not a nickname of a version of Andriod?A. cupcakeB. GingerbreadC. HoneycombD. MuffinAns: D

    30. Which among these are NOT a part of Android's native libraries?A. WebkitB. DalvikC. OpenGLD. SQLiteAns: B

    31. Which among these are NOT a part of Android's native libraries?A. WebkitB. Dalvik

  • 7/28/2019 Final Exam in Android Programming

    6/10

    C. OpenGLD. SQLiteAns: B

    32. What operating system is used as the base of the Android stack?A. LinuxB. WindowsC. JavaD. XMLAns: A

    33. When developing for the Android OS, Java byte code is compiled into what?A. Java source codeB. Dalvik application codeC. Dalvik byte code

    D. C source codeAns: C

    34. Which of these are not one of the three main components of the APK?A. Dalvik ExecutableB. ResourcesC. Native LibrariesD. WebkitAns: D

    35. What was the main reason for replacing the Java VM with the Dalvik VM when the projectbegan?A. There was not enough memory capabilityB. Java virtual machine was not freeC. Java VM was too complicated to configureD. Java VM ran too slowAns: B

    36. Which is the correct way to create and display a Toast?A. Toast.makeText(this, Hello, Toast.LENGTH_SHORT);

    B. Toast t = new Toast(Hello);

    C. Toast.makeText(this, Hello, Toast.LENGTH_SHORT).show();

    D. Toast.create(this, Correct Answer, Toast.LENGTH_LONG).display();Ans: C

    37. How you get access to a TextView, named tView, in your XML file?A. TextView t = (TextView) getViewById(tView);

    B. TextView t = (TextView) findViewById(R.id.tView);

    C. TextView t = findViewById(R.id.tView);

    D. TextView t = getViewById(tView);

  • 7/28/2019 Final Exam in Android Programming

    7/10

    Ans: D

    38. Which is the correct function that will be called when your Receiver catches and Intent?A. onReceive(Context context, Intent intent)B. onCreate(Bundle b)C. onResume()D. onStart(Context context, Intent intent)Ans: A

    39. The API are constantly being updated. Which once popular Service method is now deprecated?A. public int onStartCommand(Intent intent, int flags, int startId)B. public void onCreate()C. public void onStart(Intent intent, int startId)

    D. public void onDestroy()Ans: A

    40. Which components can see an application's shared preferences?A. An outside application, but it must call the preferences's databaseB. A serviceC. A and BD. A and CAns: D

    41. Which called is used to get a handle on the GSP provider?A. Context.getSystemService(Context.LOCATION_SERVICE);B. Context.getLocationService();C. Context.getSystemService(GPS_PROVIDER);D. Context.getGpsService();Ans: A

    For Questions 42-45. Refer to this:Given the following URI content://feu.eastasia.android/mobile3/13

    42. What segment is the address?A. contentB. feu.eastasia.androidC. mobile3D. 13Ans: C

    43. What segment is the protocol?A. content

  • 7/28/2019 Final Exam in Android Programming

    8/10

    B. feu.eastasia.androidC. mobile3D. 13Ans: A

    44. What segment is the id?A. contentB. feu.eastasia.androidC. mobile3D. 13Ans: D

    45. What segment is used to determine the kind of data being requested?A. contentB. feu.eastasia.android

    C. mobile3D. 13Ans: A

    TEST II. FILL IN THE BLOCKS: (46 -51)A. The Activity Life CycleThe figure below illustrates the paths an activity might take between states. The rectangles represent thecallback methods you can implement to perform operations when the activity transitions between states. Fillthe rectangles with the name of callback methods.

  • 7/28/2019 Final Exam in Android Programming

    9/10

    The Activity Life Cycle

    B. Android Coding.Layouts. Give the Outline the contents of an XML file, called main.xml, that wouldgenerate the layout shown below. (52 60)

    47

    46

    48

    49

    50

    51

  • 7/28/2019 Final Exam in Android Programming

    10/10

    XML Code: (ANSWER)

    ***** END OF TEST *****