https://cdn1.knowledgeboat.com/img/java-programs/solutions-p33-1.jpg