Example of inheritance heirachy utilizing java