Aa

Text size

?

Map / Methods

🧩 Methods

A method is a named piece of code you can call with different inputs. Parameters bring values in, return sends one back, and void methods just do something.

  • static
  • return
  • void
  • parameters
  • overloading
  • scope

🛠 You will build: A small math toolkit

0 / 10 done

  1. 🔮 Predict 1. Following a call
  2. 👣 Trace 2. Each call gets its own variables
  3. 🔮 Predict 3. Can a method change my variable?
  4. 🧩 Order 4. Keep it in range
  5. ✏️ Fill in 5. Method headers
  6. 🐞 Debug 6. Missing return
  7. 🐞 Debug 7. Printing nothing
  8. 🔧 Modify 8. Add a parameter
  9. ⌨️ Write 9. Is it prime?
  10. ⌨️ Write 10. Same name, different types

Unit check

Earlier activities again, with new inputs and edge cases. They also come back on the map as review the next day.

  1. 🔮 Predict Check 1. Check: a swap that is not
  2. ⌨️ Write Check 2. Check: repeat, two ways