人口規模に応じて属性を自動的に割り当てる機能を持つJavaプログラムを書いてください。
public class PopulationAttributeAssigner {

    public static String assignAttribute(int population) {
        if (population < 0) {
            throw new IllegalArgumentException("population must be >= 0");
        }
        if (population <= 10000) {
            return "Small";
        } else if (population <= 100000) {
            return "Medium";
        } else if (population <= 1000000) {
            return "Large";
        } else {
            return "Very Large";
        }
    }
}