oop - How do I prevent code from creating instances of a base class? -


Assume that I inherited from circle and triangle classes Size class My question is how do I stop making the example of the size class?

You make the shape class abstract As the basis of the classes, there is an incomplete service which provides extra functionality.

For example, if you have loaded classes, then you have an abstract class DataLoader and solid class DatabaseLoader , XmlLoader ...

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -