Question: A 2 B ( 2 0 marks ) Develop a Java Program to Model a Currency Conversion System Write a Java program of handling purchase

A2B (20 marks)
Develop a Java Program to Model a Currency Conversion System
Write a Java program of handling purchase orders by fulfilling the following requirements, which includes two classes: CurrencyConverter, and AskCurrencyConverter.
* This assessment work may not reflect a real and complete scenario in a ctual cases.
with these input parameters accordingly.
- A related method converts US dollars to foreign currency:
If amount is greater than or equal to the threshold amount, applies half commission rate
If amount is less than the threshold amount, applies full commission rate
Formula: dollar \(\times \) exchangeRate \(\times \)(1- commission)
- A related method converts foreign currency to US dollars:
If equivalent USD amount is greater than or equal to the threshold amount, applies half commission rate
If equivalent USD amount is less than the threshold amount, applies full commission rate
Formula: foreignMoney \(\div \) exchangeRate \(\times \)(1- commission)
- A related method sets/gets the exchange rate between USD and foreign currency.
- A related method sets/gets the commission rate charged for conversion.
- A related method sets/gets the threshold amount for reduced commission. 2. Class AskCurrencyConverter [6 marks]Create a public Java class AskCurrencyConverter, in file AskCurrencyConverter.java, as the main class of the Currency Conversion System based on the description below.Instantiate two CurrencyConverter objects with the following attributes:Set largeAmount to US\$50000.Use the yenConverter to convert 1500000 yens to US dollars.Use the yenConverter to convert from US \(\$ 2000\) to yens.Set the exchange rate of euro to 0.9881.Use the euroConverter to convert 170000 euros to USS.Use the euroConverter to convert from US\$20000 to euros.
Sample Program Output
```
--- Currency Conversion System, A2,00P,2024***
1500000 yens = US$ 12958.0812445981
US$ 2000=231284.30000000002 yens
170000 euros = US$ 172021.55652261918
US$ 20000=19756.0714 euros
>>> END of main(). Done by ,,,
```
3. Evaluation and Submission
- Mark sure you follow the instructions, including the required naming (e.g. parameters, methods and files).Compile, Run, Debug, Test and Evaluate your program based on the requirements.Submit ALL required files to SOUL:Java Source code files: CurrencyConverter.java and AskCurrencyConverter.javaCompiled bytecode files: CurrencyConverter.class and AskCurrencyConverter.classDo NOT compress/zip or rename the files. Submission work not following instructions and requirements may not be marked or be penalized.*IMPORTANT* No Late Submission. Make sure the submitted work is the most updated.
* Remarks:More testing may be performed during assessment based on the requirements, apart from the given testing cases.
A 2 B ( 2 0 marks ) Develop a Java Program to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!