Classes write when it is necessary to encapsulate (select in a separate place) some kind of behavior. Classes in programming are primarily code with methods that do something, and not just a display of entities from the subject area.
Therefore, if CD and DVD discs have the same behavior, then they need one class, possibly with different field values.
enum class Content { Music, Video, /* ... */ }; class OpticalDisk { public: enum Kind { CD, DVD, BD }; ??? private: Kind kind_; Content content_; };
But it is possible that the classes of CDs and DVDs do not have any behavior at all. Then do not make them classes, make the usual data structure
struct OpticalDisk { enum Kind { CD, DVD, BD }; Kind kind; Content content; };