Implemented computed property degree in Vertex class.