Let $G$ be a finite $p$ groups with,
- $|G'|=p$
- $|G:Z(G)|=p^2$
- $Z(G)$ is cyclic.
$1)$ Can $G$ have nonabelian maximal subgroup ?
It is clear that all maximals containing the center are abelian. Is there any non-abelian one ?
$2)$ Let $M$ be a maximal subgroup containing $Z(G)$, Can $M$ be cyclic ? If $M$ is cyclic, Can be said something further ?
Any result and reference about such groups are welcome.
(1) Consider $G=(C_{p^2}\times C_p)\rtimes C_p=\langle x,y,z\rangle$ with relations $$ zxz^{-1}=x, zyz^{-1}=x^py.$$ Then $Z(G)=\langle x\rangle$ and $\langle x^p,y,z\rangle$ is non-abelian maximal subgroup.
Also $\langle x,y\rangle$ is maximal subgroup containing $Z(G)$, but not cyclic.
If $M$ is a maximal subgroup containing $Z(G)$, then $M/Z(G)$ will be cyclic, hence $M$ will be ...?.....(easy answer).
(2) If a non-abelian group contains a cyclic subgroup of index $p$, then $G$ is of type $$C_{p^n}\rtimes C_p=\langle x,y\colon x^{p^n}, y^p, yxy^{-1}=x^{1+p^{n-1}}, p>2,$$ and for $p=2$, $G$ is dihedral, (generalized) quaternion, or semi-dihedral (concern Wiki for details of (2)).