import java.util.*; public class Proov4{ public static void main(String[] arg){ List kastid=new ArrayList(); kastid.add(new Kast(50, 20, 10)); kastid.add(new PuustKast(40, 20, 10, 2)); for(Kast k: kastid){ System.out.println(k.ruumala()); } } }