Q1. If there is a class named Account as follows: Public class…