package model; public class Model { public static double calcArea(double base, double height) { if (base <= 0 || height <= 0) { throw new IllegalArgumentException("Nem megfelelő paraméterek"); } return (base * height) / 2; } }