結果 : java program using hierarchical inheritance to find square and cube