public class CustomerDetailsFormatter { /** * Format the customer object according to some needs * @param c * @return */ public String getFormattedDescription(Customer c) { String buffer = "Customer description: \n"; buffer += " Number: " + c.getCustomerNumber(); buffer += " Name: " + c.getName(); buffer += " Address: " + c.getAddress(); buffer += "\n"; return buffer; } }