$G/Z(G)$ is cyclic then $G$ is abelian 
Prove that if $G/Z(G)$ is cyclic then $G$ is abelian, where $Z(G)$ denotes the center (Zentrum) of the group $G$.

Comment:
I know this has been proven many times here and  i'll post some related questions below. 
My try:
We want to show that if $G/Z(G)=\langle\eta\rangle,\space \eta\in G$ is cyclic, then it follows that $G$ is abelian, i.e for every $x,y \in G$, $xy=yx$.
Let's take $a,b \in G$, both have left cosets in $G/Z(G)$, namely $aZ(G), bZ(G)$, but since $G/Z(G)$ is cyclic, there must $\exists \space i,j \in \mathbb{N} $ so that $(aZ(G))^i=e$ and $(bZ(G))^j=e$ . Further we have:
$$(aZ)^i(bZ)^j=a^i b^j Z=e,$$
$$(bZ)^j(aZ)^i=b^ja^iZ=e$$
$$\text{and}$$
$$a^i b^jZ=b^j a^iZ.$$
For each element $z\in Z$ there exists an inverse $z^{-1}$, so that $zz^{-1}=e$. And we can multiply $a^i b^jZ=b^j a^iZ$, by the inverse of $z$ for each $z\in Z$ respectively, to get $a^ib^j=b^j a^i$, now if we choose $x,y$ so that: $a^i=x, b^j =y$ then we have: $xy=yx$ and we have proven that $G$ is abelian.
Question: 

Is my logic here ok? I'm a bit concerned since I didn't use the fact that we have $Z(G)$ the center of the group, i.e. that elements in $Z(G)$ commute with every other element in $G$.

Alternatively:
Since $G/Z(G)$ is cyclic this implies that it's also abelian and we would have for two different left cosets of elements $g_1,g_2 \in G$:
$$(g_1 Z)(g_2 Z)=g_1 g_2 Z$$
$$\text{and}$$
$$(g_2 Z)(g_1 Z)=g_2 g_1 Z.$$ 
Then since $G/Z(G)$ is abelian:
$$(g_1 Z)(g_2 Z)=(g_2 Z)(g_1 Z) \rightarrow g_1 g_2 Z = g_2 g_1 Z,$$
by the same argument as above we now multiply by the inverse $z^{-1}$ for every element $z \in Z$ respectively to get: $g_1 g_2 =g_2 g_1$, for $\forall g_1, g_2 \in G$.
Question: 

Again I never used the fact that elements in $Z(G)$ commute with every other element of the group. 

Related questions:
Proving that if $G/Z(G)$ is cyclic, then $G$ is abelian
Proving that if $G/Z(G)$ is cyclic, then $G$ is abelian
Quotient group G/Z is cyclic
Proof that if group $G/Z(G)$ is cyclic, then $G$ is commutative
If $G/Z(G)$ is cyclic, then $G$ is abelian
 A: There are a few parts of your proof which are not quite correct. For starters, $a^i b^j Z(G) = b^j a^i Z(G)$ means that the following sets are the same:
$$
\{ a^i b^j z \mid z \in Z(G) \} = \{ b^j a^i z \mid z \in Z(G) \}.
$$
This means that for any $z \in Z(G)$ there exists $z' \in Z(G)$ such that $a^i b^j z = b^j a^i z'$, and vice versa, but you can't necessarily just multiply by the inverse to get $a^i b^j = b^j a^i$, for this $z$ and $z'$ would have to be equal. The other proof has the same problem. 
Furthermore, in the last step of the first proof, you take $x = a^i$ and $y = b^j$, but here you should also be careful, you don't know if all $x, y \in G$ are expressible like this, so then it doesn't follow that $xy = yx$ for all $x, y \in G$. And finally; you should also realise that the fact that a group is cyclic does not necessarily mean every element has finite order: $\mathbb{Z}$ is an example of a cyclic group without any elements of finite order!
Anyway, I'll post part of a correct solution. Neither of your proofs really use precisely what it means for $G/Z(G)$ to be cyclic, so let's actually use that now. A group is defined to be cyclic if it's generated by a single element, so in our case, there is some element $s \in G$ such that
$$
G/Z(G) = \{ \dots, s^{-2} Z(G), s^{-1} Z(G), Z(G), s Z(G), s^2 Z(G), \dots \}.
$$
We let $x, y \in G$ and set out to prove $xy = yx$. We know all elements of $G$ are elements of some coset of $Z(G)$, and so there are $n, m \in \mathbb{Z}$ such that $x \in s^n Z(G)$ and $y \in s^m Z(G)$... I think you can take it from there.
