The Third Version

1. A get method and a set method are added for the variable x.
2. The toString method in Object class is overridden to show more
details about the functions.