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

Click Counter Panel

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create a Swing panel with a button and label. Each simulated button click must increase the counter and update the label.

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
Clicks: 1
Input: number of button clicks = 1.
Derivation: count starts at 0 and increases once per click, so count = 0 + 1 = 1 | "Clicks: " + 1 = "Clicks: 1".
Final label text:
Clicks: 1
Sample #2
Public sample
4
Clicks: 4
Input: number of button clicks = 4.
Derivation: count starts at 0 and increases once per click, so count = 0 + 4 = 4 | "Clicks: " + 4 = "Clicks: 4".
Final label text:
Clicks: 4

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