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.
    1. What will happen when the user taps the button once?
    1. What will happen when the user taps the button twice?