You need to use the correct syntax to access a function:
Also it is not generally the best idea to have class functions getting console input. It is better to do that at the main level and then use
to pass the value into the object, and
to return it to the caller.