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

Cinema Booking Object

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create two Java files: Main.java and CinemaBooking.java.

Read the required values, construct a CinemaBooking object, and print a multiline report.

The report must contain these lines in this order:

  1. Movie
  2. Available
  3. Revenue

Use a constructor and keep the object-oriented structure clear.

Input Format

Input is provided as separate whitespace-separated tokens in the same order described in the problem statement.

Output Format

Print the exact multiline report required by the question.

Sample Testcases

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

Sample #1
Public sample
M1
100
40
3.5
Movie: M1
Available: 60
Revenue: 140.00
Input: movie code = "M1", total seats = 100, sold seats = 40, ticket price = 3.5.
Key calculation(s): "Movie: " + "M1" = "Movie: M1" | "Available: " + 100 - 40 = "Available: 60".
Output:
Movie: M1
Available: 60
Revenue: 140.00
Sample #2
Public sample
M2
50
50
5.0
Movie: M2
Available: 0
Revenue: 250.00
Input: movie code = "M2", total seats = 50, sold seats = 50, ticket price = 5.0.
Key calculation(s): "Movie: " + "M2" = "Movie: M2" | "Available: " + 50 - 50 = "Available: 0".
Output:
Movie: M2
Available: 0
Revenue: 250.00

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