Currency Code Look Up Java

Currency Code Look Up Java

 

Review the section 8.6 – Array traversal

Using the provided Java program, complete the code to do the following:

  1. The changes to the methods are listed in the comments above the method names. 
  2. Modify the method findMyCurrency() to do the following:

         a. Use a do-while loop

         b. Prompt for a currency to find. 

         c. Inside this loop, call the lookUpCurrency() method can pass the inputed currency code value.

         d. The lookUpCurrency() method needs to loop through the list of currencies and compare the passed currency code with the currency code in the array. Display the results as in the example below.

              Look at the showCurrencies() method for a example of how to loop for each element.

              In the lookUpMyCurrency() method

                             If found – Display the currency code and index where it was found – i.e. “FJD found at index 0”.

                             If not found – Display the currency code and ” Currency Code NOT found!”. 

            b. Prompt with “Retry Y/N ?” to try again. If I select N, then exit the loop.   Allow any other char to restart the loop and prompt for a currency to find.

Because you are comparing strings, remember to use the .equals method – not ==.

Enter a Currency Code to Find: USD

USD Currency code found at index _##__

Retry Y/N ? Y

Enter a Currency Code to Find: ZZZ

ZZZ Currency code NOT found!

Retry Y/N ? N

Our Essay Writing Service Features

Qualified Writers
Our writers are vetted and meet the required academic level. They are competent professional and reliable.
Anonymity
The writer does no know who you are no one knows that you are ordering and we keep our records really safe.
Free Turnitin Report
Every paper comes with afree turnitin report. This assures you of our emphasis on original papers free from plagiarism.
Safe Payments
You can rest assured that our payment processor is very determined to keep your information secure.
No Hidden Charges
The prices that we quote are the final prices that you pay for the paper. Unless you change the instructions midway, your payments will cover all revision costs.
24/7/365 Support
We are always online to support you. Reach out through whatsapp, email or through our livechat.
$15.99 Plagiarism report
$15.99 Plagiarism report
$15.99 Plagiarism report
$15.99 Plagiarism report
$3.99 Outline
$21.99 Unlimited Revisions
Get all these features for $65.77 FREE
Do My Paper

Frequently Asked Questions About Our Essay Writing Service

Academic Paper Writing Service

Our essay writers will gladly help you with:

Find Your Writer

Fast Reliable and Convinient Writers you can Trust

Customer ID: #499222
Research Paper
Woow! This was fast and amazing. I highly recommend this writer!
Writer: Kaylin G.
08/10/2021
Customer ID: #499222
Essay (any type)
This writer is great, finished very fast and the essay was perfect. Writer goes out of her way to meet your assignment needs!
Writer: Mohhamed H.
08/10/2021
Customer ID: #499222
Research Paper
This has saved my day! Will definately order again
Writer: Rodgers O
08/10/2021
Customer ID: #499222
Essay (any type)
I wish I had known this much earlier. Totally saved my day I will use again.
Writer: Samson M.
08/10/2021
Place an Order

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00