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

Mouse Hover Status Panel

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create a Swing panel with a hover target. Mouse enter and exit events must update the status 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
Mouse: IN
Input: 1 for enter, 0 for exit = 1.
Derivation: entered == 1 is true, so mouseEntered(...) runs | "Mouse: " + "IN" = "Mouse: IN".
Final label text:
Mouse: IN
Sample #2
Public sample
0
Mouse: OUT
Input: 1 for enter, 0 for exit = 0.
Derivation: entered == 1 is false, so mouseExited(...) runs | "Mouse: " + "OUT" = "Mouse: OUT".
Final label text:
Mouse: OUT

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