Hockey Teams (Form Designer)

Grade 12

This is a form-based problem — open it in the Form Designer, not the code judge. Learners interested in hockey are grouped into full teams of 11 players; anyone left over goes on a reserve list. A constant PLAYERS = 11 is already declared. An edit box (edtLearners) holds the total number of interested learners; a button (btnCalculate) and a memo (memResult) are already on the form. Write btnCalculate's OnClick handler so that it works out how many full teams that makes, and how many learners are left on the reserve list.

No input/output in the console sense. Grading sets edtLearners.Text, clicks btnCalculate once, then checks memResult.Text. Format (two lines): Number of hockey teams: <n> Number of learners on reserve list: <n> Example: 49 learners -> 4 teams, 5 on reserve.

Hockey Teams─ ▢ ✕
Total number of learners:
Hockey teams

4 components · drag to move, corner handle to resize, Delete to remove

Object Inspector

Select a component on the form to edit its properties.

Palette

Pick a component, then click the form

Standard

Additional

Data

Non-visual