```java /* * 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 mockskeleton; import java.time.LocalDate; import java.time.format.DateTimeFormatter; public class Customer { private String surname; private String forename; private int balance; private LocalDate due; /** * @return the surname */ public String getSurname() { return surname; } /** * @param surname the surname to set */ public void setSurname(String surname) { this.surname = surname; } /** * @return the forename */ public String getForename() { return forename; } /** * @param forename the forename to set * @throws mockskeleton.CustomerException */ public void setForename(String forename) throws CustomerException{ this.forename = forename; } /** * @return the balance */ public int getBalance() { return balance; } /** * @param balance the balance to set */ public void setBalance(int balance){ this.balance = balance; } /** * @return the due */ public LocalDate getDue() { return due; } /** * @param due the due to set */ public void setDue(String due) throws CustomerException{ if(!due.matches("[0-9]{4}-[0-9]{2}-[0-9]{2}")) throw new CustomerException("Date must be in yyyy-MM-dd format"); //Tell Java what format the String is in DateTimeFormatter dateInput = DateTimeFormatter.ofPattern("yyyy-MM-dd"); //Now parse that String this.due = LocalDate.parse(due, dateInput); } public String toString() { return this.getForename() + " " + this.getSurname() + " £" + this.getBalance()/100.0+ " " + this.getDue(); } } ```