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

Announcement Dialog Panel

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create a Swing panel with a text field, button, and label. Clicking the button must update the label and attempt to show a dialog using JOptionPane.

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
hello
Announcement: HELLO
Input: announcement text = "hello".
Derivation: "hello".toUpperCase() = "HELLO" | "Announcement: " + "HELLO" = "Announcement: HELLO".
Final label text:
Announcement: HELLO
Sample #2
Public sample
notice
Announcement: NOTICE
Input: announcement text = "notice".
Derivation: "notice".toUpperCase() = "NOTICE" | "Announcement: " + "NOTICE" = "Announcement: NOTICE".
Final label text:
Announcement: NOTICE

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