Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code for option 1, 2 and 3 in dev c++ Program Requirements Your program must first read the data from the symbol.txt and date.txt data

Code for option 1, 2 and 3 in dev c++

image text in transcribed

Program Requirements Your program must first read the data from the symbol.txt and date.txt data files and store the data in 1-0 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. Program Requirements Your program must first read the data from the symbol.txt and date.txt data files and store the data in 1-0 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

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

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

1844804526, 978-1844804528

More Books

Students also viewed these Databases questions