Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program Requirements Your program must first read the data from the symbol.txt and date.txt data files and store the data in 1-D arrays. The maximum

Program Requirements Your program must first read the data from the symbol.txt and date.txt data files and store the data in 1-D arrays. The maximum size of the array to store stocks symbols is 100. The maximum size of the array to store dates is 30. Using the values of m and n, the data from stock.txt is read and stored in the 2-D array, stocks. Your program must then provide a menu with the following options: 1. Find the highest closing price of a given stock and the date on which it occurred 2. Find the total volume traded of a given stock 3. Find the date of the biggest difference between high and low prices of a given stock 4. Find the stock with the biggest difference between high and low prices on a given date 5. Find the biggest changing stock price between a previous day's close and next day's open 6. Find the percentage increase/decrease of each stock based on first day / last day prices 7. Plot a graph showing the price of a given stock on each day 8. Quit Option 1 The code for this option should input the stock symbol from the user. If the symbol is not found, an appropriate message is displayed. It searches the 2-D array for the highest closing price of the given stock and displays the highest closing price and the date on which the stock was traded at this price. Option 2 The code for this option should input the stock symbol from the user. If the symbol is not found, an appropriate message is displayed. The code should calculate the total volume traded for the given stock on all the trading days and display this value to the user. Option 3 The code for this option should input the stock symbol from the user. If the symbol is not found, an appropriate message is displayed. The code should find the date of the biggest difference between the high and low prices of the given stock and display the date, the high and low price, and the difference. Option 4 The code for this option should input the date in (day, month, year) format from the user. It should check if the data is available for this date. If not, an appropriate message is displayed. (Note that there is no need to check if the date entered by the user is a valid date.) The code should check all the stocks on this date to find the stock with the biggest difference between the high and low prices. The stock symbol, the high and low price, and the difference are displayed to the user. Option 5 The code for this option should examine all the stocks in the 2-D array to find out the biggest price difference between a previous days closing price and the next days opening price. The difference could be negative or positive. The stock symbol, the previous days closing price, the next days opening price, and the dates of the two days should be displayed to the user. program needs to be done in c++

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

Step: 3

blur-text-image

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

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

What is the Market Entry Strategy for the company Carmax?

Answered: 1 week ago

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago