Question
It would not let me add .txt file when updating. Copy and pasted a small portion of the stocks that need to be included. The
It would not let me add .txt file when updating. Copy and pasted a small portion of the stocks that need to be included. The only one explicitly reffered to in the question not present is TWX as there was no information for this stock in the file
A,20210210,124.59,125.74,123.88,125.08,1112500
AA,20210210,21.58,22.12,21.0524,21.56,5196400
AAC.U,20210210,10.8,10.8032,10.61,10.65,487000
AZRE,20210210,37.84,38.66,37.04,37.76,221500
AZUL,20210210,24.66,24.72,23.53,23.58,788200
AZZ,20210210,50.49,50.63,49.45,49.63,102700
B,20210210,52.51,52.93,51.58,52.2,113200
BA,20210210,215.65,217.49,211.12,211.92,11498300
BZH,20210210,19.35,19.4696,18.5426,19.15,354800
BZM,20210210,15.4284,15.4284,15.4284,15.4284,500
C,20210210,63.48,63.9899,62.98,63.62,12672800
C-J,20210210,28.11,28.15,27.87,28.07,63000
CZZ,20210210,19.39,19.5,18.92,19.45,315300
D,20210210,73.57,73.62,72.63,73.09,3749200
DMO,20210210,14.53,14.6464,14.51,14.535,55700
E,20210210,21.38,21.58,21.15,21.57,483000
ELC,20210210,25.95,25.9797,25.76,25.8065,25200
ELF,20210210,23.41,23.41,22.42,23.06,639400
ETB,20210210,14.99,15,14.85,14.87,54900
EXR,20210210,120.87,120.99,117.63,118.31,537800
EXTN,20210210,4.97,5.0999,4.77,5.03,191000
FAF,20210210,55.44,56.11,55.18,55.26,814400
FAI.U,20210210,12.91,13.34,12.52,13.02,46800
FVRR,20210210,297.39,298.37,273,281.89,1253400
FVT.U,20210210,11.01,11.1,10.92,10.96,27400
G,20210210,42.64,43,41.45,42.27,2456400
GAB,20210210,6.43,6.44,6.38,6.41,334700
GE,20210210,11.59,11.59,11.38,11.4,45481100
GWB,20210210,26.92,26.97,26.07,26.29,338900
HBM,20210210,6.58,6.92,6.58,6.68,1031200
HNGR,20210210,23.99,24.09,23.1,23.1,139800
HNI,20210210,34.33,34.74,33.92,34.21,167600
HNP,20210210,13.05,13.25,13.01,13.18,87900
HTA,20210210,29.06,29.28,28.85,29.09,1009500
HYB,20210210,8.98,9,8.93,8.97,70600
HZON,20210210,11,11.02,10.81,10.94,253000
INSI,20210210,21.22,21.37,21.22,21.37,7600
ISD,20210210,15.65,15.65,15.58,15.64,92700
IT,20210210,183.44,183.6,178.91,180.64,598300
JBL,20210210,44.94,45.11,44.085,44.17,867900
JTD,20210210,14.36,14.3903,14.25,14.37,56000
JW.A,20210210,51.54,52.21,50.88,51.51,228800
JW.B,20210210,53.75,53.75,51.47,51.47,400
KIM-M,20210210,26.48,26.49,26.33,26.33,5800
KIO,20210210,15.44,15.44,15.35,15.38,84300
KKR-C,20210210,68,68,67.2,67.82,239900
KO,20210210,50.41,50.58,49.53,49.6,22963300
KSS,20210210,50.19,50.92,49.31,49.98,2258700
KW,20210210,17.88,18.06,17.75,17.85,276800
KWA.U,20210210,10.73,10.73,10.68,10.73,600
KWR,20210210,291.57,293.37,285.45,286.98,89200
KYN,20210210,6.89,6.96,6.8,6.91,514200
L,20210210,48.26,48.3,47.65,47.99,552100
LZB,20210210,41.26,41.7,39.991,41,427100
M,20210210,15.44,15.74,15.06,15.33,11330200
MA,20210210,335,335.47,332.25,334.21,4244400
NAC,20210210,15.25,15.32,15.22,15.3,161900
NAD,20210210,15.41,15.45,15.37,15.45,855100
NAN,20210210,14.58,14.61,14.5,14.53,20300
NDP,20210210,15.81,16,15.7,15.88,8900
NEA,20210210,15.05,15.08,14.99,15.03,1092600
NEE,20210210,84.95,84.99,83.45,83.91,6200900
NWHM,20210210,5.71,6.08,5.56,6.08,119200
NWN,20210210,47,47.5,46.21,46.67,173700
NX,20210210,24.92,24.92,24.26,24.27,100700
O,20210210,62.12,63.49,61.95,62.5,3453400
OAC.S,20210210,11.82,11.91,11.55,11.55,64300
OAC.Z,20210210,2.35,2.47,2.06,2.16,172600
OXM,20210210,74.34,74.44,71.82,72.45,100800
OXY,20210210,24.83,25.79,24.8,25.6,22378900
OXY.W,20210210,11.09,11.76,11.05,11.51,702800
PAC,20210210,104.74,104.89,103,104.45,50900
PAC.U,20210210,12.41,12.8,11.95,12.29,452400
PZC,20210210,10.53,10.59,10.53,10.58,17900
PZN,20210210,9.8,9.94,9.48,9.75,91100
QD,20210210,3.09,3.23,2.92,3.22,8554800
QEP,20210210,3.37,3.48,3.31,3.43,2364100
QFT.U,20210210,10.29,10.3,10.17,10.22,361600
QTS,20210210,67.01,67.02,65.34,65.56,491100
QTS-A,20210210,27.6,27.6,27.3,27.3,2600
QTS-B,20210210,149.17,149.17,147.44,147.44,41400
R,20210210,68.87,70.23,68.12,69.14,646600
RA,20210210,19.3,19.3,18.88,18.98,333600
RZA,20210210,26.98,26.98,26.7,26.93,19600
RZB,20210210,29,29,28.78,28.98,26800
SA,20210210,19.42,19.47,18.92,19.04,293100
SUPV,20210210,2.02,2.02,1.89,1.94,345400
SUZ,20210210,12.46,12.79,12.41,12.74,367600
SWB.U,20210210,12.66,12.68,12.36,12.48,676100
SWCH,20210210,19,19.32,18.78,19.15,1426500
SWI,20210210,17.1,17.28,16.83,17.16,1196100
T,20210210,28.64,28.66,28.48,28.55,42259100
TWTR,20210210,65.8,69.25,63.2,67.77,73603100
TX,20210210,28.9,29.08,28.19,28.19,462400
TXT,20210210,49.34,49.64,48.57,49.32,718600
UBER,20210210,62,63.5,60.8,63.18,36917500
V,20210210,207.97,207.97,205.94,206.44,8466400
VAC,20210210,142.87,145.36,141.04,142.84,532900
VGI,20210210,12.19,12.19,11.91,12.08,69100
WCC,20210210,78.51,82.93,76.76,77.31,1382500
WCC-A,20210210,30.92,30.92,30.71,30.75,12300
WCN,20210210,99,99.31,98.13,98.47,938400
WMT,20210210,145.83,145.9,143.54,144.13,6188900
X,20210210,16.71,16.86,16.16,16.41,15649800
XAN,20210210,4.03,4.13,3.99,4.07,440300
XAN-C,20210210,23.65,24.08,23.61,23.61,11600
YUM,20210210,103.78,105.34,102.99,104.82,2005100
YUMC,20210210,61.55,62.49,60.29,60.5,2839500
ZBH,20210210,160,162.45,159.52,160.34,1644300
ZEN,20210210,156,157.43,152.76,154.49,1283000
ZIM,20210210,16.51,17.6,16.29,17.43,985900
Programming Assignment 5 - The Stock Picker The Stock Market is the perfect place for programs. Crunching a large volume of data is what software was built to do. In fact, 75-80% of trades today are all automated orders that originate through software programs. This is where searching and sorting algorithms can really show their strengths. For this assignment, we'll look at Java's searching and sorting mechanisms as a means of wrangling all this data together (and maybe make a little money, too!). Program requirements: O First, download the most recent daily stock data for the New York Exchange from the following site: http://www.eoddata.com/Download.aspx You will need to create a new account. When you get access, click on "Home" ^ "Download." There are quick links for the latest files. Your download should either be a .txt or .csv file When you open your file, you will see a list of stocks and numbers, separated by commas. They are in the following format: Stock Symbol, Date, Open, High, Low, Close, Volume Create a new class called "StockTracker" Create a new class called "Stock." It should have methods and variables to handle all six stock fields mentioned above, e.g., getHigh().getLow(), etc...). Use appropriate Object-Oriented design. Create a new ArrayList of Stock objects Read in the stocks text file and parse by commas. You can use the String.split() method to break apart each line around the comma punctuation and then put it in an array For each line, create a new Stock object and assign it the parsed values from the temporary array Utilize Java's search and sort methods to answer and print the following queries: o What is the stock with the highest opening price that day? o What is the stock with the lowest opening price that day? List the top five stocks with the highest highs List the bottom five stocks with the lowest lows How did the following stocks perform? Disney (DIS) General Electric (GE) Wal-Mart (WMT) Coca-Cola (KO) Time Warner (TWx) Which stock had the highest volume that day? Which stock had the lowest volume that day? o O Note: since these are custom objects, we can't simply call sort() without a Comparator. Furthermore, each object will have multiple fields to sort by. To set up a Comparator, use syntax such as this: ComparatorStep 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