Real world activity - Finance
Parsing data is amazingly important/powerful. In this warmup activity
you are going to parse the file of data to retrieve the important
info. Look at this website.
Start with this zip.
We want just a few things:
- the date of last trade (it will always be the same)
- the name/price of all 8 indexes (ie MSCIEAFE -> 1,553.26)
Note the only thing that changes are the price and date.
So in the end what I need is it to print out
On 11/27:
MSCIEAFE -> 1,553.26
MSCIEMEA -> 309.84
...
Also in your code I want the following variables:
String date;
double mscieafe, msciemea, msciem, mscieurope, mscila, mscipacific, msciacworld, msciworld;
all of which will be set to the appropriate values.
Also to change to a double from a String
double x = Double.parseDouble("34.44");
Note you cant have commas in a number before you convert.
|