#include <oxstd.h>
class AnnualSample
{                                    // constructor
    AnnualSample(const iYear1, const iYear2);
    decl m_iYear1;
    decl m_iYear2;
};
AnnualSample::AnnualSample(const iYear1, const iYear2)
{
    m_iYear1 = iYear1;
    m_iYear2 = iYear2;
}
class AnnualDb : AnnualSample        // derived class
{
    AnnualDb();                      // constructor
    ~AnnualDb();                     // destructor
    Create(const mX, const asX, const iYear1, const iYear2);
    virtual Report();
    decl m_mX;
    decl m_asX;
};
AnnualDb::AnnualDb()
{
    AnnualSample(0, 0);
    m_mX = <>;
    m_asX = {};
}
AnnualDb::~AnnualDb()
{
    println("Destructor call: deleting object.");
}
AnnualDb::Create(const mX, const asX,const iYear1,const iYear2)
{
    m_mX = mX;
    m_asX = asX;
    AnnualSample(iYear1, iYear2);
    Report();
}
AnnualDb::Report()
{
    println("The sample size is: ", m_iYear2 - m_iYear1 + 1);
}
main()
{
    decl db = new AnnualDb();
    db.Create(rann(20,2), {"Var1", "Var2"}, 1981, 2000);
    delete db;
}
