To Lecture Notes

IT 372 -- May 20, 2024

Review Questions

  1. Write an Android app that draws vertical lines in a MyView object placed in a linear layout. Use radio buttons to specify the color: red, blue, and white.
    Answer: activity_main.xml  MainActivity.java  VertLine.java  MyView.java
  2. Write an Android app that displays a circle in a MyView object placed in a linear layout. Use a seekbar to change the radius of the circle from 30 to 200 pixels and back.
    Answer: activity_main.xml  MainActivity.java  MyView.java
  3. In what ways is Kotlin similar to and different from Java?
  4. After looking at the examples in the Introduction to Kotlin document, implement the Magic8Ball Example using Kotlin for the Prediction and MainActivity classes.

Introduction to Kotlin