This is an assignment when I study Java. I feel that I may very oftenly reference to this in future and hence uploading this to github.