Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Currency conversion issue.

706710Oct 16 2010 — edited Oct 17 2010
Hi,
We are designing a java based application for currency conversion where the currency name and currency decode values are stored in Currency Table,The foreign exchange rates are stored in Foreign_exchange rates table.I have to go ahead and implement this,can you please suggest me some ideas as to how should i go about implementing this.This scenario is in Trading based real time application where the foreign exchange rates are changing every now and then,so my question is how will i get the latest value which will be in sync and calculate the "correct conversion rate".Please advice..What datastructure should i use for implementing this.



Currency Table
Currency name| Decode
Indian Rupee | INR

Foreign Exchange Rate(Example) table
CurrencyName| F_E_Name| F_E_Value
INR | USD | 46
INR | EUR | 56
INR | GBP | 80 INR | Dinar | 120 ... so on

The above values will be got from a foreign exchange feeder system,how will i ensure the values are in sync always?Hope my question is understood now.

i have also implemented the below classes.

class currency{
private int currencyPk;
private String primaryCurrencyName;
private String decode;
//getter and setters for the same
}

class foreignExchangeRate{
private int currencyFk;
private String primaryCurrencyName;
private String foreignExchangeCurrencyName;
private int foreignExchangeCurrencyValue;
//getter and setters for the same
}

Please advice on the implementation part
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 14 2010
Added on Oct 16 2010
7 comments
766 views