Write a program that takes custom order as an input and sort the given strings according
to this order. All strings are uppercase letters in that question. Please use the starter
template we are provided.
Q2) Investors place buy and sell orders for a particular stock on an electronic exchange, speci-
fying a maximum buy or minimum sell price that they are willing to pay, and how many
shares they wish to trade at that price. Develop a program that uses priority queues to
match up buyers and sellers and test it through simulation. Maintain two priority queues,
one for buyers and one for sellers, executing trades whenever a new order can be matched
with an existing order or orders. Your program takes a .txt le which is containing the
orders in each line and also create a output le to show trades between buyers and sellers.
In the input le, rst column specify the trade type, second column represent specic id
for each buyer or seller, third column represent number of share and last column specify
minimum selling price for sellers or maximum buying price for buyers. Notice that priority
for sellers is one who gives lowest price and for buyers is one who gives highest price. Please
use the starter template we are provided.
11 freelancers are bidding on average $34 for this job
Hi, I am really good java. I might be of great help to you :) I have a lot of national level programming prizes. Currently I am a PhD student. I will look forward to working with you :) -- Vijeth J K