This paper discusses a generalized model for compact stars, assumed to be anisotropic in nature due to the spherical symmetry and high density. After embedding the four-dimensional spacetime in a five-dimensional flat spacetime, which may be treated as an alternative to Karmarkar's condition of embedding class 1 spacetime, the Einstein field equations were solved by employing a class of physically acceptable metric functions proposed by Lake \cite{Lake2003}. The physical properties determined include the anisotropic factor showing that the anisotropy is zero at the center and maximal at the surface. Other boundary conditions yielded the values of various parameters needed for rendering the numerous plots and also led to the EOS parameters. It was further determined that the usual energy conditions are satisfied and that the compact structures are stable, based on several criteria, starting with the TOV equation. The calculation of the effective gravitational mass shows that the models satisfy the Buchdahl condition. Finally, the values of the numerous constants and physical parameters were determined specifically for the strange star LMCX-4. It is shown that the present generalized model can justify most off the compact stars including white dwarfs and ultra dense compact stars for a suitable tuning of the parametric values of $n$., Comment: 15 pages, 11 figures and 3 tables