CurrencyExchange Class and Client
<p>Currency Exchange Class:</p>

<p>Develop a class currency which converts US dollars to values from 5 countries of your choice. Current exchange rates can be found at <a href="http://www.fms.treas.gov/intn.html#rates" rel="nofollow">http://www.fms.treas.gov/intn.html#rates</a>.  The class should define constants for the exchange rates and a private dollar field.  Methods might include utilities such as toEuros, toPesos, etc which return the dollar field in the corresponding currency.</p>

<p>Client Application:</p>

<p>Develop a Java application to convert dollars to the desired currency.  The end-user should supply the dollar amount and indicate which currency to convert to.  The client application should call the appropriate method to obtain the equivalence in the desired currency.  Display the dollar amount and it's equivalent on the monitor.  You may use either the Scanner or JOptionPane class for obtaining user input.  A sample run using the Scanner class is shown below:</p>

<p>Enter a dollar amount: 5:00</p>

<p>Enter the currency to convert to </p>

<p>(1) euro, (2) pound, (3) taka, (4) yen, (5) rupees : </p>

<p>5.0 dollars = 3.845 euros</p>

<p>You may use any method to indicate the desired currency.  However, instructions must be clear to the end-user.</p>

<p>This is my service class</p>

<pre><code>public class CurrencyExchange
{
   private double dollar;
    private double euro, pound, taka, yen, rupees;
    private double currency;

    private static final double EURO = 0.7650;
    private static final double POUND = 0.6370;
    private static final double TAKA = 79.0000;
    private static final double YEN = 78.0000;
    private static final double RUPEES = 52.2500;

    public CurrencyExchange()
    {
       dollar = 0;
    }

    public CurrencyExchange(double dollars)
    {
       dollar = dollars; 
    }

    public void setEuro (double dollars)
    {
       euro = dollars * EURO;
    }

    public double getEuro()
    {
       return euro;
    }

    public void setPound (double dollars)
    {
       pound = dollars * POUND;
    }

    public double getPound()
    {
       return pound;
    }

    public void setTaka (double dollars)
    {
       taka = dollars * TAKA;
    }

    public double getTaka()
    {
       return taka;
    }

    public void setYen  (double dollars)
    {
       yen = dollars * YEN;
    }

    public double getYen()
    {
       return yen;
    }

    public void setRupees (double dollars)
    {
       rupees = dollars * RUPEES;
    }

    public double getRupees()
    {
       return rupees;
    }

    public double getCurrency()
    {
       return currency;
    }
</code></pre>

<p>}</p>

<p>This is my client class</p>

<pre><code>import java.util.Scanner;

public class CurrencyExchangeClient
{
   public static void main(String[] args)
    {
       Scanner in = new Scanner(System.in);


        System.out.print("Enter a dollar amount: ");
        double dollars = in.nextDouble();

        System.out.println("Enter the currency to convert to (1) euro, (2) pound, (3) taka, (4) yen, (5) rupees : ");
        int response = scan.nextInt;


        if (response == 1 || response == 2 || response == 3  || response == 4 || response == 5)
        dollars = scan.nextDouble();

        switch (response)
        {
           case 1: getEuro();
                    break;
            case 2: getPound();
                    break;
            case 3: getTaka();
                    break;
            case 4: getYen();
                    break;
            case 5: getRupees();
                    break;
            default: System.out.println("Invalid Response");
        }

        System.out.println(getCurrency());



    }
}
</code></pre>

<p>Whenever I compile the program using JGrasp it keeps giving me a missing symbols error, I don't know why though. It should look like the Example application program.</p>

<p>In addition are the toEuro (method) needed and do I have to remove the constants in private class and just set them up in accessor/mutator methods instead if that helps with the program.</p>

<pre><code>CurrencyExchangeClient.java:14: error: cannot find symbol
        int response = scan.nextInt;
                       ^
  symbol:   variable scan
  location: class CurrencyExchangeClient

CurrencyExchangeClient.java:30: error: cannot find symbol
            case 5: getRupees();
                    ^
  symbol:   method getRupees()
  location: class CurrencyExchangeClient
</code></pre>

<p>Those are just a couple of examples.</p>
