Investors issue buy and sell orders for a certain stock on an electronic exchange, stating a maximum purchase or minimum sell price and the number of shares they desire to trade at that price. Create and simulate a programme that matches customers and vendors by using priority queues. Maintain two priority queues, one for buyers and one for sellers, and execute transactions whenever a fresh order can be matched with a previously placed order or orders.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter7: File Handling And Applications
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question

Investors issue buy and sell orders for a certain stock on an electronic exchange, stating a maximum purchase or minimum sell price and the number of shares they desire to trade at that price. Create and simulate a programme that matches customers and vendors by using priority queues. Maintain two priority queues, one for buyers and one for sellers, and execute transactions whenever a fresh order can be matched with a previously placed order or orders.

 

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Fundamentals of Computer System
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning