Question: I want this java program as soon as possible Open Book 5) Write a java program to do the following: (40) Create a file stock.txt

I want this java program as soon as possible

I want this java program as soon as possible Open Book 5)

Open Book 5) Write a java program to do the following: (40) Create a file stock.txt with the following information: IBM, International Business Machines Corporation, 144.84, 5/2/2016 AAPL, Apple Inc., 92.63, 5/2/2016 ORCL, Oracle Corporation, 45.96, 4/26/2018 CSCo, Cisco Systems, 44.21, 4/26/2018 Create a java class "Stock" with the following fields: o Symbol o Name o Price o date Write a program to read data from the file stock.txt. for each line of data create an object of Stock class and store them in 1) ArrayList 2) a hash map as HashMap String,Stock>. The key will be the Symbol field (like IBM or CSCO). 3) Ask user to enter the symbol 4) Call a method searchArrayList(ArrayList, symbol) to search the ArrayList for the Symbol and return the price 5) Call a method searyHash(Hash,symbol) to search the Hash for the symbol and return the price 6) Call method printArrayList to print all the information of Stock in sorted order of Symbol 7) Call method printHash to print all the information of Stock in 8) Add one more Stock (ORCL, Oracle Corporation, 45.96, 9) Call method printArrayList to print all the information of Stock 10) Call method printHash to print all the information of sorted order of Symbol 4/26/2018) to both ArrayList and HashMap in sorted order of Symbol Stock in sorted order of Symbol

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!