Of course...
class AObstacle { }
(Plus, any inheritance model you use.) There is nothing stopping you from doing this.
Remember that a class is not what you define. Type is. A class is simply a language / syntax construct used to describe a type. If the type described has no attributes or operations other than an inheritance model, then there is nothing to add to it.
Although you add one thing. You give him a name. This does not seem like much, but defining a semantic concept with a specific name (especially in a statically typed environment) is very important. Your type now has an identifier different from other types in the system. If things are added to them later, there is a place to add them without refactoring and break the changes.
David source
share