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

Attendance Entry

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

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

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

The report must contain these lines in this order:

  1. Student
  2. Attendance

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
Lina
18
20
Student: Lina
Attendance: 90.00
Input: student name = "Lina", present classes = 18, total classes = 20.
Key calculation(s): "Student: " + "Lina" = "Student: Lina" | "Attendance: " + String.format("%.2f", (18 * 100.0) / 20) = "Attendance: 90.00".
Output:
Student: Lina
Attendance: 90.00
Sample #2
Public sample
Omar
7
10
Student: Omar
Attendance: 70.00
Input: student name = "Omar", present classes = 7, total classes = 10.
Key calculation(s): "Student: " + "Omar" = "Student: Omar" | "Attendance: " + String.format("%.2f", (7 * 100.0) / 10) = "Attendance: 70.00".
Output:
Student: Omar
Attendance: 70.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