/*
 * Created on 2007.03.26.
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package gyak6;

import gyak6.hu.u_szeged.inf.alk.Alkoholos;

/**
 * @author bekesi
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class SikidomMain {

	public static void main(String[] args) 
	{
		Sikidom[] st = new Sikidom [20];
		for (int i=0; i<20; i++)
		{
			if (Math.random() <= 1.0/3.0)
				st[i]=new Kor(i+1.0);
			else
				if (Math.random() <= 2.0/3.0)
					st[i]=new Negyzet(i+1.0);
				else
					st[i]=new Teglalap(i+1.0,i+2.0);
		}
		int k = 0;
		for (int i=0; i<20; i++)
		{
			System.out.print(st[i]);
			System.out.println("ter:"+st[i].terulet()+",ker:"+
					st[i].kerulet());
			if (st[i] instanceof Kor)
				k++;
		}
		System.out.println("Krk szma:"+k);
	}
}
