In literature, there are three simplest methods of solving Einstein's field equations, namely, (a) assuming conformally flat spacetime, (b) using conformal killing vector and (c) using Karmarkar conditions. In all these approaches the two metric functions
and
are link via a bridge. However, the first two approaches are facing a critical failure while determining central red-shift while the last method always yields well-behaved solution. Therefore, we are adopting the last method and discover a generalized class one solution. It is found that the maximum mass and radius of the compact star describe by the solution strongly depends on the parameter
n
. As
n
increases the maximum mass and radius also increases. For
3.3
,
1.459
and
9.52
, and for
4.8
have
1.766
with
10.31
. For
4.8
the equation of state is behaving linearly as the speed of sound is almost constant at 0.333. In overall the presented solution is well-behaved in all respects.