Next
0 / 15
Module DEMO-33-72DEMO-OOP-33

Student Profile Inheritance

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create three files: Main.java, PersonProfile.java, and StudentProfile.java. Use inheritance so StudentProfile extends PersonProfile and print the full report.

Input Format

Input is given as whitespace-separated tokens for the base-class fields first, followed by the child-class fields.

Output Format

Print the exact multiline report required by the problem.

Sample Testcases

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

Sample #1
Public sample
Lina
20
S10
Name: Lina
Age: 20
Student ID: S10
Input: person name = "Lina", age = 20, student id = "S10".
Key calculation(s): "Name: " + "Lina" = "Name: Lina" | "Age: " + 20 = "Age: 20".
Output:
Name: Lina
Age: 20
Student ID: S10
Sample #2
Public sample
Omar
22
S20
Name: Omar
Age: 22
Student ID: S20
Input: person name = "Omar", age = 22, student id = "S20".
Key calculation(s): "Name: " + "Omar" = "Name: Omar" | "Age: " + 22 = "Age: 22".
Output:
Name: Omar
Age: 22
Student ID: S20

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