An algebraic treatment of the nuclear quadrupole degree of freedom