INQ241B
Mobile Apps

Review 3

A Miniature Practice Test

  1. What is the difference between use horizontal layout and set horizontal align?

  2. For the following script:

    page main ()
    initialize
      ◳count := 0
    display
      boxed
        box→set width(10)
        box→set height(10)
        if ◳count = 0 then
          box→set background(colors→black)
        else
          box→set border(colors→black, 0.1)
        end if
        box→on tapped(handler)
          where handler() is
            ◳count := ◳count + 1
        end
      end boxed
    end page
    1. Draw what will be displayed when the app first starts.

    2. What will happen when the user taps the button once?

    3. What will happen when the user taps the button twice?

  3. Create a script that initially displays some text, anything you want, and a single button, side-by-side centered in the screen. Tapping the button should toggle the text between being visible and being hidden.