You are given a string of currency exchange rate pairs, e.g., "AUD:USD:0.7,AUD:JPY:100,USD:CAD:1.2" (or equivalently pairs like a:b=1:1.5, b:c=1:1.5). The problem is delivered in escalating parts: Part 1: Implement a direct exchange rate lookup function that, given a fromCurrency and toCurrency, returns the rate. Crucially, you must support reverse lookup: if…