And you could do it...
inline virtual char* identify() const =0;
inline virtual float GetVolume() const =0;
inline virtual float GetSurface() const =0;
virtual int commit(const char * filename) const = 0;
class cylinder : public body {
virtual char* identify() const;
virtual float GetVolume() const;
virtual float GetSurface() const;
virtual int commit(const char * filename) const;
cylinder(const char * filename);
// a cylinder is described by
class cube : public body {
virtual char* identify() const;
virtual float GetVolume() const;
virtual float GetSurface() const;
virtual int commit(const char * filename) const;
cylinder(const char * filename);
// a cube has just one length to
We save the data on a file…
…and have a way of reconstructing the objects…
in this way, they become (simple) persistent objects!