Getter is a subroutine which is invoked with the reference expression format.
access-control getter return-type getter-name
You can use the abbreviation eg instead of endgetter.
In the class definition, it is possible to define getters of any number at any place outside the other member definitions.
Getter's main aim is the provision of way of access to a field.
Access-control determines the access level of the getter by specifying a keyword either open or closed.
If it is open, you can invoke the getter from outside the class definition. If it is closed, you can invoke the getter only inside the class definition.
The getter is a keyword which indicates this is a getter. It must be present between the access-control and return-type.
The return-type is a specification of a class which is returned.
Identifier and embedded class name can use for the getter name.
At a minimum, a return statement is required.
The endgetter is a keyword which indicates end of definition. You can use the abbreviation eg instead of endgetter.
A getter generates a scope.
A getter can return to invoker from anywhere by return statement. The return statement should return an instance of the class which is specified.