class DelegatingTradeLineAggregator implements LineAggregator<Object> {

	private LineAggregator<Trade> tradeLineAggregator;

	private LineAggregator<CustomerCredit> customerLineAggregator;

	@Override
	public String aggregate(Object item) {<FILL_FUNCTION_BODY>}

	public void setTradeLineAggregator(LineAggregator<Trade> tradeLineAggregator) {
		this.tradeLineAggregator = tradeLineAggregator;
	}

	public void setCustomerLineAggregator(LineAggregator<CustomerCredit> customerLineAggregator) {
		this.customerLineAggregator = customerLineAggregator;
	}

}

		if (item instanceof Trade) {
			return this.tradeLineAggregator.aggregate((Trade) item);
		}
		else if (item instanceof CustomerCredit) {
			return this.customerLineAggregator.aggregate((CustomerCredit) item);
		}
		else {
			throw new RuntimeException();
		}
	
<no_super_class>