Question
This should be donw in java. In this assignment, we are going to be using Maps. Key values would be Symbol, a String, and value
This should be donw in java.
In this assignment, we are going to be using Maps. Key values would be Symbol, a String, and value would be a data structure of your choice.
Key values can be obtained from your consolidated file of Tickers.csv. Sample data files are given for testing purposes only.
The problem is the length and the name of the data files are unknown and we need to make sure not to lose any data. To solve the problem, select a data structure, as a value for your map. This data structure must be capable of supporting any length of files.
However, we know certain parameters to be as follows:
The data to be inserted would be double perhaps, read as String, but need to store in our program as double for mathematical operations that will be done later on.
We need to save Date, High, Low, and Adj Close values.
We can have duplicate values for High, Low and Adj Close among themselves and for next item of the symbol.
When done (attempt to print), all key values must be in an ascending order.
Process of reading data files must be automated. For example, when done reading consolidated file, your symbols must be sorted, then, read a file as Symbol.csv. For example, if the symbol in key position is found to be QQQ, the data file must be QQQ.csv.
Flow of your program is recommended to be as follows:
Declare a map using String as keys and data structure of own choice for values.
Read Tickers.csv and store symbols into key part of your map.
Now read symbol from your map and read file that is named as symbol.csv (QQQ symbol, thus file must be QQQ.csv).
We are required to store three values from each line. These values are to be stored as double.
It is important to understand that we would have so many lines for each symbol.
key position is found to be QQQ, the data file must be QQQ.csv. Flow of your program is recommended to be as follows: Declare a map using String as keys and data structure of own choice for values. Read Tickers.csv and store symbols into key part of your map. Now read symbol from your map and read file that is named as symbol.csv (QQQ symbol, thus file must be QQQ.csv). We are required to store three values from each line. These values are to be stored as double. It is important to understand that we would have so many lines for each symbol.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started