I have the following problem. It is well known that $H^\ast(D\_8,\mathbb{Z}/2)\cong \mathbb{F}\_2[x,y,w]/(xy=0)$ with $|x|=|y|=1$ and $|w|=2$ (see Adem,Milgram "Cohomology of finite groups"). So we get that.
$$
H^2(D\_8,\mathbb{Z}/2)=\mathbb{F}\_2\langle x^2, y^2,w\rangle.
$$


I wanted to ask if there is any method/reference for describing extensions corresponding to particular cohomology classes. I am especially interested in classes $x^2+y^2+w$ and $x^2+w$.


Also, a broader question is - are there any general, or more general, methods of constructing extensions given a class in the second cohomology of a group? Any reference or help would be appreciated.


EDIT: $D\_8$ here is the group of symmetries of a square.



Identifying group extension from cohomology class of $D_8$
Here is a start for your specific questions. It is easy to see that under the inclusion $C\_4 < D\_8$, $x$ and $y$ both map to the 1 dimensional class and $w$ maps to the nonzero 2 dimensional class. So one concludes that a group $P$ of order 16 fitting into a central extension
$$ C\_2 \rightarrow P \rightarrow D\_8$$
corresponds to an element of $H^2(D\_8)$ that involves $w$ if and only if $P$ has a cyclic subgroup of order 8, as $C\_8$ is the group fitting into the nontrivial central extension  

$$ C\_2 \rightarrow C\_8 \rightarrow C\_4.$$


Checking the wonderful website GroupNames ([https://people.maths.bris.ac.uk/~matyd/GroupNames/index.html](https://people.maths.bris.ac.uk/%7Ematyd/GroupNames/index.html)) one sees that there are only three groups of order 16 that both have $D\_8$ (called $D\_4$ there) as a quotient and $C\_8$ as a subgroup: $D\_{16}$, $Q\_{16}$, and $SD\_{16}$.


I think that $w$ corresponds to $D\_{16}$ since I think one gets the right cohomology ring. (See another fun website: <https://users.fmi.uni-jena.de/cohomology/16web/index.html>) Symmetry considerations make me then guess that $x^2+y^2+w$ corresponds to $Q\_{16}$ and $x^2+w$ corresponds to $SD\_{16}$.


