B4Coder

🗂️ Student Records (CRUD) · Mission 4 of 6

🗑️ Delete a Student

Arun has transferred to another college. Select him and press Delete: he should leave the list.

Your mission

  1. Add a "delete" path. Find where the student is: pos = 0, then Count i from 1 to length(records): if records[i].roll == form.roll, pos = i.
  2. If pos > 0: gone = records[pos].name, Change a List: remove item pos from records, ok = true, message = "Deleted " + gone.
  3. Otherwise ok = false and message = "No student with roll " + form.roll.

Getting the mission ready…