  We demonstrate a technique to generate new class of exact solutions to the
Einstein-Maxwell system describing a static spherically symmetric relativistic
star with anisotropic matter distribution. An interesting feature of the new
class of solutions is that one can easily switch off the electric and/or
anisotropic effects in this formulation. Consequently, we show that a plethora
of well known stellar solutions can be identified as sub-class of our class of
solutions. We demonstrate that it is possible to express our class of solutions
in a simple closed form so as to examine its physical viability for the studies
of relativistic compact stars
