/* Generated by Together */ import java.util.Vector; public class LetterGenerator { private Template letter; public LetterGenerator() { setLetter(new Template()); } public void setLetter(Template T) { letter = T; } public Template previewLetter() { return letter; } public void generateLetter(CustomerListNode cust) { String salutation = cust.getSalutation(); String name = cust.getFirstName()+cust.getLastName(); String date = cust.getRecentPurchase(); String specialOrderNumber = "15318"; letter.setName(cust.getCustomerID()); letter.setContent(" Dear " + salutation + " " + name + ",\n\n" + " Thank you very much for ordering from us on " + date + ". We recently received" + "several\n thousand cans of the very special ingredient, which has" + "returned from a luxurious trip to Hawaii, and we can\n make a" + "one-time offer of just US$99.99 per case. If you are interested," + " just call 1-800-555-1234 or click to:\n\thttp://www.TheHappyViking.com/SpecialOrder/" + specialOrderNumber + "/order.html\nIf you contact us by phone, mention special order #" + specialOrderNumber + " to get this extra special discount.\n\nThanks again fromall of" + "us at The Happy Viking. We hope you have many days and nights enjoying this\nwonderful delicacy."); } }