Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This will be the first lab that requires a jar file submission. Please refer to the jar file submission procedure in the projects section of

image text in transcribed
This will be the first lab that requires a jar file submission. Please refer to the jar file submission procedure in the projects section of the course website for submission instructions. This will be used to submit your entire eclipse project instead of just one java file In the src folder of your eclipse project, create a new package named submission". In this newly created submission package create a class named Lab7" and in it write a public static method named processTrades" that takes 1 String as a parameter and returns a HashMap with Strings as keys and values of any type you choose. T input String of this method will be the name of a CSV file containing stock trades in the format "trader_name,buy_or_sell.quantity,ticker_symbol". This method will process these trades and return the number of shares owned by each trader after all these trades have been executed. There is no header line in the file and you may assume all traders start with 0 shares of any stock. The keys in the returned HashMap will be the names of traders mapping to an instance of an object containing information about all the shares they own. These instances can be any type you choose (Hint: You should create your own class for this type) but when the toString method is called on each instance it will print the information for the trader in the format "trader_ nameinnticker_symbol.quantity_owned nticker_symbol.quantity_owned". That is the first line of the String is the name of the trader followed by a line for each stock they own in the CSV format "ticker_symbol,quantity_owned" This functionality can be accomplished by overridding the toString method in your custom class. This class should be created in a seperate file instead of being an inner class of the Lab7 class. Since you are submitting hism a jar file containing your entire eclipse project you will be submitting all classes that you write in all files (ie. You can write as many custom classes as you'd like in as many files as you'd like) 9 ks like you haven't started Firefox in a while. Do you want to

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

KEY QUESTION Refer to the table in question

Answered: 1 week ago