private IClass GetRectangleClass()
{
var variables = new string[] { "x", "y", "width", "height" };
var methods = new string[]
{
"x ^x",
"y ^y",
"x: newX x := newX",
"y: newY y := newY",
"area ^x*y",
"width ^width",
"height ^height",
"width: newWidth width := newWidth",
"height: newHeight height := newHeight",
"side: newSide x := newSide. y := newSide"
};
if (this.rectangleClass == null)
{
this.rectangleClass = ParserTests.CompileClass(
"Rectangle",
variables,
methods);
}
return this.rectangleClass;
}