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 isometries of a square.