Java II Mid-Term - Solutions can be found on Github 1. Consider the hierarchy of…