According to J.S. Rose book "A Course on Group Theory":
In class equation $|G|=\sum_{i=1}^k|G:C_G(x_i)|$ where $x_1,x_2,...,x_k\in G$ one from each of above $k$ classes; $K(G)$ is called the class number of $G$.
Now I want to verify:
$ K(G)=3 \Longrightarrow G\cong\mathbb Z_3\ \mathrm{or} \ G\cong S_3$
If $K(G)=3$ then I see $|Z(G)|=1$, $|Z(G)|=2$ or $|Z(G)|=3$. $|Z(G)|=3$ leads $G$ to be abelian so I have $G\cong\mathbb Z_3$. If $|Z(G)|=2$ so I have an element, say $x$, in $G$ which doesn't belong to its center. Therefore $d=|G:C_G(x)|\big|\ |G|$ and so $d=1$ or $d=2$. It is clear to me that these two make contradictions. I see myself very close to $S_3$ when $|Z(G)|=1$. Please, if I am on a right way help me about the final choice $|Z(G)|=1$. Thanks