Groups with order $p^3$ ($p$ prime) have two non commutative isomorphism classes I read in an exercise, that a group with $p^3$ ($p$ prime) elements have $2$ non commutative isomorphism classes. Unfortunately there was just this statement without any explanation. We just solved it for the commutative case.
Hope someone could explain, why there are just two classes.
Thank you in advance.
 A: The document groupsp3.pdf shows a detailed answer of all isomorphy classes of groups with order $p^3$ and $p$ prime.
There are $5$ classes: 3 abelian and 2 non-abelian
The abelian ones are easy to see: $\mathbb{Z}/p^3\mathbb{Z},\mathbb{Z}/p\mathbb{Z} \times \mathbb{Z}/p\mathbb{Z} \times \mathbb{Z}/p\mathbb{Z}$ and $\mathbb{Z}/p\mathbb{Z} \times \mathbb{Z}/p^2\mathbb{Z}$ 
For the non-abelian we have to differentiate between $p=2$ and $p\not=2$.
Case $p=2$: The only non-abelian groups are $Q$ the Quaternion group and $D_4$ the Dihedral group.
Case $p\not=2$: It turns out that the following (up to isomorphy) groups are the only non-abelian groups with order $p^3$.
(1.) Heis$(\mathbb{Z}/p\mathbb{Z}) = \left\{ \left. \begin{pmatrix} 1 & a & b \\ 0 & 1 &c \\ 0 & 0 & 1 \end{pmatrix} \right| a,b,c \in \mathbb{Z} / p \mathbb{Z}  \right\} $ 
(2.) $G_p =\left\{ \left. \begin{pmatrix}  1+mp & a \\ 0 & 1  \end{pmatrix} \right| a,m \in \mathbb{Z} / p^2 \mathbb{Z}  \right\}$
If $p=2$ the groups (1.) and (2.) are isomorphic.
Now, we see above all $5$ isomorphy classes for an arbitrary prime $p$ and group with $|G|=p^3$.
