السابق التالي
0 / 15
الوحدة النمطية DEMO-33-74DEMO-OOP-33

Toggle Status Panel

DEMO-OOP-33 • Object Oriented Programming

Browser-only practice

بيان المشكلة

Create a Swing panel with a checkbox, a button, and a label. The label must show whether the checkbox is on or off after the action event.

تنسيق الإدخال

Input is given as whitespace-separated values and is used by Main.java to simulate the GUI interaction.

تنسيق الإخراج

Print the final label text returned by the simulation.

حالات اختبار نموذجية

Submit runs every public testcase in this browser. Results and code never leave this device.

العينة رقم 1
عينة ظاهرة
1
Status: ON
Input: checkbox state as 0 or 1 = 1.
Derivation: checked == 1 becomes 1 == 1 = true | "Status: " + "ON" = "Status: ON".
Final label text:
Status: ON
العينة رقم 2
عينة ظاهرة
0
Status: OFF
Input: checkbox state as 0 or 1 = 0.
Derivation: checked == 1 becomes 0 == 1 = false | "Status: " + "OFF" = "Status: OFF".
Final label text:
Status: OFF

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
إعدادات المحرر