Possible cup product structures on a manifold

I am studying for a qualifying exam, and I came across this problem:

Let $M$ be a closed orientable connected 4-manifold with $H^1(M) = H^3(M) = 0$ and $H^2(M) \cong H^4(M) \cong \mathbb Z$. What are the possible cup product structures on $H^*(M)$?

My thoughts: Just using properties of graded rings, we see that the product will be determined by $\alpha^2 \in H^4$, where $\alpha$ is a generator of $H^2$. If we fix $\beta$ a generator of $H^4$, then $\alpha^2 = n\beta$, so it seems like there is a distinct structure for each $n \in \mathbb Z$.

My question is: is there anything special about the cohomology ring $M$ that restricts the possibilities further? Somehow my answer seems too easy.

-

I will denote by $LH^*$ the free part of the cohomology ring. (That means that $LH^r(M)$ is $H^r(M)/\mathrm{torsion part}$.) For a connected 4-manifold, the symmetric form $I : LH^2(M) \times LH^2(M) \to \mathbb Z$ defined by $\alpha \smile \beta = I(\alpha, \beta) [M]$ is nondegenerate (that's one of the consequences of Poincaré duality). By definition, this means that the map $LH^2(M,\mathbb Z) \to \mathrm{Hom}(LH^2(M),\mathbb Z)$ is a bijection: in more pedestrian terms, that means that the matrix of $I$ has determinant $\pm 1$). So, in your case, $n$ is either $1$ or $-1$.
Both cases happen: you get $n=1$ with $\mathbb P^2(\mathbb C)$ and $n=-1$ with the same manifold with the orientation reversed.
Why is $\det I(\alpha,\beta)=n$? – user54631 Aug 12 '14 at 16:25