Below is a class Person and you want to add a method greet to this class. This method is supposed to return the message Hello, I am name! where name is the name of this person.
Your task here is to define this method; read data from the input; create an instance of the class Person with the input value as the parameter name; call the method greet on this instance and print the result.
You can see an example below.
The input format:
The name of the person.
The output format:
Printed return value of the method greet.