Wrote tests for CanExtendsOnlyClasses
Wrote CanExtendOnlyClasses
replaced throw_error with throw_exception