Abstract class with all concrete methods

后端 未结 9 1319
感情败类
感情败类 2020-12-08 21:49

Are there some practical programming situations for someone to declare a class abstract when all the methods in it are concrete?

9条回答
  •  佛祖请我去吃肉
    2020-12-08 22:29

    When you have an important class but the system cannot create an instance fo this class, because

    • this class is parent of a lot of classes of the system;
    • this has a lot of responsability (methods used by a lot of class) for domain's requires;
    • this class not represents a concrete object;

提交回复
热议问题