Employee Bonus Calculator (Form Designer)

Grade 12

This is a form-based problem — open it in the Form Designer, not the code judge. An edit box (edtYears) holds an employee's years of service; a checkbox (chkManager), a button (btnCalculate) and a label (lblResult) are already on the form. A constant P = 8 represents a company-wide base value. Write btnCalculate's OnClick handler so that it works out the employee's bonus and shows it on lblResult — adding 10% if chkManager is checked.

No input/output in the console sense. Grading sets edtYears.Text and chkManager.Checked, clicks btnCalculate once, then checks lblResult.Caption. Formula: , then +10% if chkManager is checked. Format: 'R' followed by the amount rounded to two decimal places. Examples (P = 8): Years = 4, not a manager -> 'R55388.03' Years = 4, a manager -> 'R60926.83'

Employee Bonus─ ▢ ✕
Years worked:
0
Manager
Calculate
lblResult

5 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