CJCoding With Joseph
15free / daySign inCreate account

Person Introduction Class

Create a class named Person that stores a name (string) and an age (int) in two fields. Give it a constructor that takes name and age (in that order) and saves them. Then add a method called Introduce() that returns a string in the exact form "Hi, I'm <name> and I am <age> years old." (for example, "Hi, I'm Alice and I am 30 years old."). The runner code will create a Person and print the result of Introduce().

Expected Output:

Hi, I'm Alice and I am 30 years old.

= newline. The output ends with a newline — print one after the last line.

Hints4 available
Topics:
Classes
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.