inheritance using java programming language