Known result about such $p$ groups 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.
 A: (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)).
A: To expand a little on p Groups' answer:
$p$-groups with a cyclic maximal subgroup are completely classified, see 
http://groupprops.subwiki.org/wiki/Classification_of_finite_p-groups_with_cyclic_maximal_subgroup
This essentially answers (2) and will also help with (1):
Let $z$ be a generator for the center $Z\cong C_{p^n}$.
Note that $G/Z$ must be isomorphic to $C_p^2$. Let $\{xZ,yZ\}$ be a generating set for $G/Z$. Now, $\langle x,Z\rangle$ must be abelian and contains a cyclic maximal subgroup. If it is itself cyclic, then G is classifed as per above. Up to changing our representative $x$ for $xZ$, we may thus assume that $\langle x,Z\rangle=Z\times\langle x\rangle$ and $x$ has order $p$. The same reasoning allows us to conclude that $y$ also has order $p$.
Finally, $x$ and $y$ both commute with $z$ and, since $|G'|=p$, we have $[x,y]=z^{p^{n-1}}$. 
In conclusion, under the hypothesis (1), either the group has a maximal cyclic subgroup and it appears in that classification, or it looks essentially like p Groups' example:
$G=\langle z,x,y\mid z^{p^n},x^p,y^p,[x,z],[y,z],[x,y]=z^{p^{n-1}}\rangle$. (In particular, apart from the examples with a cyclic maximal subgroup, there is a unique example of each prime power order.)
