Apex and Visualforce VisualForce: it is framework used for develop sophisticated, custom user interface that can be natively hosted on force…