I'm doing a small assignment in C++ where I have to use concepts like virtual functions and inheritance in a domain of my choice. I'm implementing the prototype for a package manager in Linux.
I have the base class Package, this has attributes like package_id, name, version, dependencies etc. There are two types of packages MetaPackages and ConcretePackages which differ in the way they must be installed and removed.
I am thinking of declaring the methods install and remove in Package as virtual. While storing these packages in a datafile can I somehow know if the stored package is Meta or Concrete.
I'm not sure as to how I should best design this. Can anybody point me to a resource so that I can better learn this stuff.
We have Grady Booch in our curriculum and honestly it's a pain to read much less comprehend.