/** * */ package de.fhswf.in.inf.java1.aufgabe5; /** * TODO Add comment here * * @author $Author: $ * @version $Revision: $, $Date: $ UTC */ public class Person { private String vorname; private String nachname; /** * TODO Add constructor comment here * * @param vorname * First name of the person * @param nachname * Last name of the person */ public Person(String vorname, String nachname) { if (vorname == null) { throw new IllegalArgumentException("Vorname can't be null"); } if (nachname == null) { throw new IllegalArgumentException("Nachname can't be null"); } if (vorname == "") { throw new IllegalArgumentException("Vorname can't be empty"); } if (nachname == "") { throw new IllegalArgumentException("Nachname can't be empty"); } this.vorname = vorname; this.nachname = nachname; } }