Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Java Console Program for stock data and please add comments so I know what's going on You've been hired by Microsoft Monarchs to
Write a Java Console Program for stock data and please add comments so I know what's going on
You've been hired by Microsoft Monarchs to write a Java console application that analyzes their stock data over the past eleven years. Use text file MicrosoftStockData.txt as input to the application. The first line of the file contains the column headers. The rest of the lines contain daily Microsoft stock data. Vahues are separated by commas into the following colmns: Column Date Close Volume Open High Low Data type String double int double double Purpose Trading date Ending share value on that day Number of shares traded during that day Starting share value on that day Highest share value on that day Lowest share value on that day Herp are the first five lines of the file: 3/5/2018,93.64,23787950,92.34,94.27,92.26 3/2/2018, 93. 05 ,32815660 r 91. 8 , 93. 15, 90 , 86 3/1/2018,92.85,36979700,93.99,94.57,91.84 2/28/2018,93.77,30011960,94.84,95.705,93.63 The application reads the data into arrays, prints the first several rows of the data, and then analyzes and charts the data. Create the following functions: e main- this function defines one array for each column of data in the input file such that there are six parallel arrays. It then calls these functions in sequence: readIextEile, printData, analyzeData, and chartData readTextFile - this function reads each line of the file, parses it into six columns, and stores each token in its respective array. It skips past the first line which contains the column headers. , printData-this function prints two header lines. The first indicates the range of dates in the data. The second shows the column headers. It then prints the first twelve lines of the data. Here is sample output
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