#include "stdafx.h"
using namespace System;
ref class Square{
public:
int Area(){
return Dims * Dims;
}
int Dims;
};
ref class Cube : public Square{
public:
int Volume(){
return Area() * Dims;
}
};
void main()
{
Cube ^cube = gcnew Cube();
cube->Dims = 3;
Console::WriteLine(cube->Dims);
Console::WriteLine(cube->Area());
Console::WriteLine(cube->Volume());
}