All pastes #960572 Raw Edit

Untitled

public text v1 · immutable
#960572 ·published 2008-03-28 07:34 UTC
rendered paste body
import ital.Bor;
import ital.Aszu;

/**
 * Futtatható osztály
 */
public class BorMain {

  public static void main(String args[]){

    for(int i = 0; i < args.length; i++){

      if(args[i].equals("aszu") && i < args.length - 2){

        kiirBor(new Aszu(Integer.parseInt(args[i+2]), Integer.parseInt(args[i+1])));
        i+=2;

        }else{

        kiirBor(new Bor(Integer.parseInt(args[i+1]), args[i]));
        i++;

        }

      }

    }

  /**
   * param @b A Bor objektum
   * Kiírja a Bor tulajdonságait
   */
  public static void kiirBor(Bor b){

    System.out.println(b);

    }

  }