A class is a template that combines data and behavior inside a single unit. While record a reference type that was…