summaryrefslogtreecommitdiff
path: root/oop/09-polymorphism/CustomerDetailsFormatter.java
blob: d2640e0304e501b7f5d2a0a90816116d9c0fe160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
	}
}