Previous Next
0 / 15
Module DEMO-33-74DEMO-OOP-33

Toggle Status Panel

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

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 Format

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

Output Format

Print the final label text returned by the simulation.

Sample Testcases

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

Sample #1
Public sample
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
Sample #2
Public sample
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
Editor settings