@@ -0,0 +1,1026 @@
+package currency_converter;%0A%0Aimport java.io.File;%0Aimport java.util.ArrayList;%0Aimport java.util.Scanner;%0Aimport currency_converter.Currency;%0A%0Apublic class Reader %7B%0A%09private Scanner sc;%0A%09ArrayList%3CCurrency%3E currencies = new ArrayList%3CCurrency%3E();%0A%09%0A%09// 1st Step: open the file%0A%09public void openFile()%7B%0A%09%09try%7B%0A%09%09%09sc = new Scanner(new File(%22rates.txt%22));%0A%09%09%7D%0A%09%09catch(Exception e)%7B%0A%09%09%09System.out.println(%22ERROR%22);%0A%09%09%7D%0A%09%7D%0A%09%0A%09// 2nd Step: read lines from the file and store in ArrayList%0A%09public void readFile() %7B%0A%09%09while(sc.hasNext())%7B%0A%09%09%09currencies.add(new Currency(sc.next(), Double.parseDouble(sc.next())));%0A%09%09%7D%09%0A%09%09sc.close();%09%09%0A%09%7D%0A%09%0A%09public void printOut()%7B%0A%09%09for (int i = 0; i %3C currencies.size(); i++)%7B%0A%09%09%09System.out.print(currencies.get(i).getName() + %22 %22);%0A%09%09%09System.out.println(currencies.get(i).getRate());%0A%09%09%7D%0A%09%7D%0A%09%0A%09public int sizeOf()%7B%0A%09%09return currencies.size();%0A%09%7D%0A%09%0A%09public String getName(int i)%7B%0A%09%09return currencies.get(i).getName();%0A%09%7D%0A%09%0A%09public double getRate(int i)%7B%0A%09%09return currencies.get(i).getRate();%0A%09%7D%0A%0A%7D%0A%09%0A%0A

Create Reader.java