...
The first thing you do is to create a folder on you disk into which you will download the TUSCANY distribution.
Next you download the latest release distribution. Launch your browser and enter one of the
following URL's.
Latest Release - http://cwiki.apache.org/TUSCANY/sca-java-releases.html
Download both the bin zip as well as the src zip to the folder that you created on your disk. Once
you completed the download you should see the following on your disk.
Next you unzip the bin zip in place, you should see the following folder file structure on your disk
after unzip is complete.
...
Code Block |
---|
package services; public class CurrencyConverterImpl implements CurrencyConverter { public float getConversion(String fromCurrencyCode, String toCurrencyCode, float amount) { if (toCurrencyCode.equals("USD")) return amount; else if (toCurrencyCode.equals("EUR")) return amount*0.7256f; return 0; } public String getCurrencySymbol(String currencyCode) { if (currencyCode.equals("USD")) return "$"; else if (currencyCode.equals("EUR")) return "€?"; return "?"; } } |
After completing these steps the content of the "store" project will look as follows.
...