Item[] catalog = new Item[fruits.length + vegetables.length];
int i =0;
for (Item item: fruits) {
double price = Double.valueOf(item.getPrice().substring(1));
price = currencyConverter.getConversion("USD", currencyCode, price);
catalog[i++] = new Item(item.getName(), currencySymbol + price);
}
for (Item item: vegetables) {
double price = Double.valueOf(item.getPrice().substring(1));
price = currencyConverter.getConversion("USD", currencyCode, price);
catalog[i++] = new Item(item.getName(), currencySymbol + price);
}
return catalog;
}