These two exercises confuses me:
Let $G$ be a group of order $p^3$, where $p$ is a prime
Show that if $|Z(G)| = p^2$ then $G/Z(G)$ is cyclic
Show that if $G/Z(G)$ is cyclic, then $G$ is abelian
What? Isn't a group $G$ abelian iff $|Z(G)| = |G|$, which is obviously not the case when $|Z(G)| = p^2$?
Sure. And therefore it follows from 1. and 2. that, if $|G|=p^3$ for some prime $p$, then $\bigl|Z(G)\bigr|\neq p^2$.