Center of Group of Order Prime Cubed

Theorem
Let $G$ be a group of order $p^3$, where $p$ is a prime.

Let $\map Z G$ be the center of $G$.

Then $\order {\map Z G} \ne p^2$.

Proof
$\order {\map Z G} = p^2$.

Then $\order {G / \map Z G} = p$.

From Prime Group is Cyclic it follows that $G / \map Z G$ is cyclic.

From Quotient of Group by Center Cyclic implies Abelian it follows that $G$ is abelian.

From Group equals Center iff Abelian it follows that $\order {\map Z G} = p^3$.

The result follows by Proof by Contradiction.