  We model a charged anisotropic relativistic star with a quadratic equation of
state. Physical features of an exact solution of the Einstein-Maxwell system
are studied by incorporating the effect of the nonlinear term from the equation
of state. It is possible to regain the masses, radii and central densities for
a linear equation of state in our analysis. We generate masses for stellar
compact objects and perform a detailed study of PSR J1614-2230 in particular.
We also show the influence of the nonlinear equation of state on physical
features of the matter distribution. We demonstrate that it is possible to
incorporate the effects of charge, anisotropy and a quadratic term in the
equation of state in modelling a compact relativistic body.
