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

Greeting Method

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Read one name, implement buildGreeting, and print the returned greeting.

Input Format

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

  1. student name

Output Format

Print the exact report in this order:

  1. Greeting

Sample Testcases

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

Sample #1
Public sample
Lina
Greeting: Welcome, Lina!
Input: student name = "Lina".
Key calculation(s): "Greeting: " + greeting = "Greeting: Welcome, Lina!".
Output:
Greeting: Welcome, Lina!
Sample #2
Public sample
Omar
Greeting: Welcome, Omar!
Input: student name = "Omar".
Key calculation(s): "Greeting: " + greeting = "Greeting: Welcome, Omar!".
Output:
Greeting: Welcome, Omar!

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