@@ -0,0 +1,2343 @@
+package BuilderPattern;%0A%0Aimport java.util.Date;%0Aimport java.util.concurrent.TimeUnit;%0Aimport FactoryMethod.*;%0Aimport java.text.DateFormat;%0Aimport java.text.ParseException;%0A%0Apublic class Builder extends AbstractBuilder%7B%0A    %0A    @Override%0A    %0A    public Reservation createReservation()%0A    %7B%0A        return new Reservation(customerId, destination, departDate, returnDate, totalSum, statusPayment);%0A    %7D%0A    %0A    @Override%0A    public boolean checkValidation() throws ProjectException%0A    %7B%0A        Customer cus= TravelAgencyMain.getCustomerbyId(this.customerId);%0A        %0A        if(!validateAlphabetic(cus.getName()) && !validateAlphabetic(cus.getSurname()))%0A        %7B%0A            throw new ProjectException(%22Name or Surname Invalid%22);%0A        %7D%0A        if (!validateAddress(cus.getAddress()))%0A            throw new ProjectException(%22Address Invalid%22);%0A        %0A        if (!validateAge(cus.getAge()))%0A        %7B%0A            throw new ProjectException(%22Age must be a positive number less than 100%22);%0A        %7D%0A        %0A        if (!validateJourneyLength(returnDate, departDate))%0A        %7B%0A            throw new ProjectException(%22Journey Length must be more than two days%22);%0A        %7D%0A     %0A        return true;%0A    %7D%0A    %0A    public boolean validateAlphabetic(String variable)%0A    %7B%0A         char%5B%5D characters = variable.toCharArray();%0A%0A         for (char ch : characters) %0A        %7B%0A%0A                if(!Character.isLetter(ch)) %7B%0A                   return false;%0A                %7D%0A        %7D%0A%0A        return true;%0A    %7D%0A    %0A    public boolean validateAge(String age)%0A    %7B%0A        if (!(Integer.parseInt(age)%3E0 && Integer.parseInt(age)%3C100 ))%0A        %7B%0A           return false; %0A        %7D%0A        return true;%0A    %7D%0A    %0A    public boolean validateAddress(String address)%0A    %7B%0A        char%5B%5D characters = address.toCharArray();%0A%0A         for (char ch : characters) %0A        %7B%0A%0A                if(!Character.isLetterOrDigit(ch)) %7B%0A                   return false;%0A                %7D%0A        %7D%0A%0A        return true;%0A    %7D%0A    %0A    public boolean validateJourneyLength(Date dt1, Date dt2)%0A    %7B%0A        %0A        long difference=TimeUnit.MILLISECONDS.toDays(dt1.getTime()) - TimeUnit.MILLISECONDS.toDays(dt2.getTime());%0A        %0A        if ((int)difference%3C=2)%0A        %7B%0A            return false;%0A        %7D%0A        return true;%0A    %7D%0A    %0A    %0A%7D%0A

Create Builder.java