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

Username Builder Toolkit

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create Main.java and UsernameToolkit.java. Use Java string methods to build the username and initials report.

Input Format

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

  1. first name
  2. last name

Output Format

Print the exact report in this order:

  1. Username
  2. Initials

Sample Testcases

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

Sample #1
Public sample
Lina
Saleh
Username: lsaleh
Initials: LS
Input: first name = "Lina", last name = "Saleh".
Key calculation(s): username = ("Lina".substring(0, 1) + "Saleh").toLowerCase() | initials = "Lina".substring(0, 1).toUpperCase() + "Saleh".substring(0, 1).toUpperCase() | "Username: " + username = "Username: lsaleh".
Output:
Username: lsaleh
Initials: LS
Sample #2
Public sample
Omar
Khaled
Username: okhaled
Initials: OK
Input: first name = "Omar", last name = "Khaled".
Key calculation(s): username = ("Omar".substring(0, 1) + "Khaled").toLowerCase() | initials = "Omar".substring(0, 1).toUpperCase() + "Khaled".substring(0, 1).toUpperCase() | "Username: " + username = "Username: okhaled".
Output:
Username: okhaled
Initials: 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