2024_09_26 - Dutton-Christian-Robotics/Learning-to-Code GitHub Wiki

Review

  • Copy/Paste from GitHub repository into Android Studio
  • package
  • Java class file
  • curly brackets and blocks
  • variables: declaration and assignment
    • property: variable belonging to an object
  • classes and objects
    • cookie cutter > cookie
  • methods and functions
  • dot syntax for accessing object properties

Activities

  • Demo classes/objects/instances with simple compiler
  • Kahoot
    • add terms for cases
  • Change the code
    • Make it drive backwards
    • Make it turn
    • talk about mecanum wheels
    • Notice: that's a lot of code and it's redundant
  • write a method/function
    • talk about variable scope
  • loops for repeating things

Concepts

  • DRY: Don't Repeat Yourself
    • more repetitive code = more opportunities for small mistakes
    • more repetitive code = harder to made broad changes
  • Writing reusable methods
  • scope