class OrderLineAggregator implements LineAggregator<Order> {

	private static final String LINE_SEPARATOR = System.getProperty("line.separator");

	private Map<String, LineAggregator<Object>> aggregators;

	@Override
	public String aggregate(Order order) {<FILL_FUNCTION_BODY>}

	/**
	 * Set aggregators for all types of lines in the output file
	 * @param aggregators Map of LineAggregators used to map the various record types for
	 * each order
	 */
	public void setAggregators(Map<String, LineAggregator<Object>> aggregators) {
		this.aggregators = aggregators;
	}

}

		StringBuilder result = new StringBuilder();

		result.append(aggregators.get("header").aggregate(order)).append(LINE_SEPARATOR);
		result.append(aggregators.get("customer").aggregate(order)).append(LINE_SEPARATOR);
		result.append(aggregators.get("address").aggregate(order)).append(LINE_SEPARATOR);
		result.append(aggregators.get("billing").aggregate(order)).append(LINE_SEPARATOR);

		for (LineItem lineItem : order.getLineItems()) {
			result.append(aggregators.get("item").aggregate(lineItem)).append(LINE_SEPARATOR);
		}

		result.append(aggregators.get("footer").aggregate(order));

		return result.toString();
	
<no_super_class>