Talk is cheap. Show me the code.
Problem : https://www.hackerrank.com/challenges/java-inheritance-2/problem
Solution :
Problem : https://www.hackerrank.com/challenges/java-inheritance-1/problem