function ArrayEx_square()
{
	var myArray = new Array(ArrayEx_square.arguments[0]);
	for (i=0; i<myArray.length; i++){
		myArray[i] = new Array(ArrayEx_square.arguments[1]);
		for(j=0;j<myArray[i].length;j++){
			myArray[i][j] = ArrayEx_square.arguments[2];
		}
	}
	return myArray;
}

function ArrayEx_gell()
{
	var count=0;
	this.add=function(value){
		this[count]=value;
		count++;
	}
	this.getSize=function(){
		return count;
	}
	this.isExistence=function(value){
		if(count!=0){
			for(i=0;i<=count;i++){
				if(this[i]==value)return true;
			}
		}
		return false;
	}
}


function ArrayEx(){
	this.square=ArrayEx_square;
	this.gell=ArrayEx_gell;
}

function DynamicArray(){

//------<コンストラクタ>------
	var innerArray = new Object();
	size = 0;
//------</コンストラクタ><プロパティ>------

	this.getSize=function()//要素数を取得する
	{
		return size;
	}
	this.addElement=function(value)//要素を追加する
	{
		innerArray[++size] = value;
	}
	this.addElementByArray=function(outerArray)//要素を配列で追加する
	{
		for(i=0;i<outerArray.length;i++)
		{
			this.addElement(outerArray[i]);
		}
	}
	this.setElement=function(num,value)//要素を設定する
	{
		if(num>size){
			return null;
		}
		innerArray[num]=value;
	}
	this.getElement=function(num)//要素を取得する
	{
		return innerArray[num];
	}
	this.isExistence=function(value)//与えられた文字列が存在するかどうか
	{
		if(size!=0){
			for(i=0;i<this.getSize();i++){
				if(this.getElement(i)==value){return true;}
			}
		}
		return false;
	}


//------</プロパティ><コンストラクタ>------

	//要素に、与えられた引数を順に加えていく
	for(i=0;i<DynamicArray.arguments.length;i++)
	{
		this.addElement(DynamicArray.arguments[i]);
	}

//------</コンストラクタ>------

}







var ArrayEx = new ArrayEx();