Previous Next
0 / 13
Module DEMO-33-61DEMO-OOP-33

Student Email Preview

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Read the student's first name, last name, and batch number, then print a generated email preview.

Input Format

Input is given as whitespace-separated tokens in this order:

  1. first name
  2. last name
  3. batch number

Output Format

Print the exact report in this order:

  1. Email
  2. Alias

Sample Testcases

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

Sample #1
Public sample
Lina
Saleh
25
Email: lina.saleh25@dc.edu
Alias: LS
Input: first name = "Lina", last name = "Saleh", batch number = 25.
Key calculation(s): email = "Lina".toLowerCase() + "." + "Saleh".toLowerCase() + 25 + "@dc.edu" | alias = "Lina".substring(0, 1).toUpperCase() + "Saleh".substring(0, 1).toUpperCase() | "Email: " + email = "Email: lina.saleh25@dc.edu".
Output:
Email: lina.saleh25@dc.edu
Alias: LS
Sample #2
Public sample
Omar
Khaled
26
Email: omar.khaled26@dc.edu
Alias: OK
Input: first name = "Omar", last name = "Khaled", batch number = 26.
Key calculation(s): email = "Omar".toLowerCase() + "." + "Khaled".toLowerCase() + 26 + "@dc.edu" | alias = "Omar".substring(0, 1).toUpperCase() + "Khaled".substring(0, 1).toUpperCase() | "Email: " + email = "Email: omar.khaled26@dc.edu".
Output:
Email: omar.khaled26@dc.edu
Alias: OK

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