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

Mouse Move Quadrant Panel

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create a Swing panel that listens for mouse movement and updates the label with the current quadrant.

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
20
30
Quadrant: TOP-LEFT
Input: mouse x = 20, mouse y = 30.
Derivation: quadrant is "TOP-LEFT" because 20 < 100 and 30 < 100 | "Quadrant: " + "TOP-LEFT" = "Quadrant: TOP-LEFT".
Final label text:
Quadrant: TOP-LEFT
Sample #2
Public sample
150
40
Quadrant: TOP-RIGHT
Input: mouse x = 150, mouse y = 40.
Derivation: quadrant is "TOP-RIGHT" because 150 >= 100 and 40 < 100 | "Quadrant: " + "TOP-RIGHT" = "Quadrant: TOP-RIGHT".
Final label text:
Quadrant: TOP-RIGHT

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