/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package guitest; /** * * @author jcmtiernan */ public class PersonInfo { private String firstNm; private String lastNm; private Integer birthMo; private Integer birthD; public PersonInfo() { this.firstNm = "Tony"; this.lastNm = "Stark"; this.birthMo = 13; this.birthD = 40; } public PersonInfo(String firstNm, String lastNm, Integer birthMo, Integer birthD) { this.firstNm = firstNm; this.lastNm = lastNm; this.birthMo = birthMo; this.birthD = birthD; } public String getFirstNm() { return firstNm; } public void setFirstNm(String firstNm) { this.firstNm = new String(firstNm); } public String getLastNm() { return lastNm; } public void setLastNm(String lastNm) { this.lastNm = new String(lastNm); } public Integer getBirthMo() { return birthMo; } public void setBirthMo(Integer birthMo) { if ((birthMo > 0) && (birthMo <= 12)) { this.birthMo = birthMo; } else { this.birthMo = 5; } } public Integer getBirthD() { return birthD; } public void setBirthD(Integer birthD) { if ((birthD > 0) && (birthD <= 31)) { this.birthD = birthD; } else { this.birthD = 5; } } }