Source: https://www.msuniv.ac.in/images/e-content/2.Object Oriented Programming with Java Lab Exercise sand Solutions.pdf