Degree method implementation and tests
#linear? and #quadratic? instance method implementation and tests