Lab 14

Algorithmic Complexity (Introduction)

Android Fundamentals (continued)

Checkout the GUI Applications project from your subversion directory:

For lab achievement points this week, explain to your Doyen or TA:

  1. Open GuiDemo in Eclipse and play with the values. The source code is in the "src" directory.
    Add another menu item
    Change the message on the button to something else
  2. In the ArrayList code, what is an ArrayList class, how does it differ from an array?
  3. Explain what happens when you hover your cursor over the functions...
    list.add()
    list.remove()
    list.get()
    another.addAll()
    another.removeAll()
  4. Play with the DogYears GUI code.
    Explain how a menu object is created and added to a window
    Explain how a button object is created and how it executes a function when called
    Explain how information is obtained from a TextField
  5. Open the ThreadDemo project
    a) hover over and read the documentation for the Thread class
    b) hover over and read the documentation for the start() function
    c) execute the ThreadDemo project and try to explain what the project is doing
  6. Open the starfield project
    a) look through the StarCanvas.java file and discuss with a neighbor what the program is doing
    b) look through the Application.java file and discuss with a neighbor what the program is doing
    c) how do the StarCanvas and Application classes divide up the work of the application? can you think of other ways this application could have been engineered? What are the benefits or drawbacks of each method?
    d) run the starfield application
    e) play with the application to make some changes to it. It’s Ok if you break it … you won’t need it again.
  7. If you have time, read other files (e.g., README) in the project to determine how to compile your projects into stand-alone or precompiled applications
    a) explain the process to a neighbor, TA, and/or Doyen
    b) try some of the pre-built applications on your machine.