Hello I am having some issues getting this code to run cleanly in c ++ and was wondering if someone could help. Since i can not attach directly please find all files needed here https://drive.google.com/file/d/17UsMDZNJ_7ne1mqV3rRyuaKWxjwvWISR/view?usp=sharing Here is the assignment; Stock Market) Write a program to help a local stock trading company  automate its systems. The company invests only in the stock market.  At the end of each trading day, the company would like to generate  and post the listing of its stocks so that investors can see how their  holdings performed that day. We assume that the company invests in,  say, 10 different stocks. The desired output is to produce two listings,  one sorted by stock symbol and another sorted by percent gain from  highest to lowest. The input data is provided in a file in the following format: symbol openingPrice closingPrice todayHigh todayLow prevClose volume The first line indicates that the stock symbol is MSMT, today’s opening  price was 112.50, the closing price was 115.75, today’s high price was  116.50, today’s low price was 111.75, yesterday’s closing price was  113.50, and the number of shares currently being held is 6723823.  The listing sorted by stock symbols must be of the following form:  ********* First Investor's Heaven ********** ********* Financial Report ********** Stock Today Previous Percent Symbol Open Close High Low Close Gain Volume ------ ----- ----- ----- ----- -------- ------- ------  ABC 123.45 130.95 132.00 125.00 120.50 8.67% 10000  AOLK 80.00 75.00 82.00 74.00 83.00 -9.64% 5000  CSCO 100.00 102.00 105.00 98.00 101.00 0.99% 25000  IBD 68.00 71.00 72.00 67.00 75.00 -5.33% 15000  MSET 120.00 140.00 145.00 140.00 115.00 21.74% 30920 Closing Assets: $9628300.00 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* Develop this programming exercise in two steps. In the first step (part  a), design and implement a stock object. In the second step (part b),  design and implement an object to maintain a list of stocks. a. (Stock Object) Design and implement the stock object. Call the  class that captures the various characteristics of a stock object  stockType. A. The main components of a stock are the stock symbol, stock price,  and number of shares. Moreover, we need to output the opening  price, closing price, high price, low price, previous price, and the  percent gain/loss for the day. These are also all the characteristics of a stock. Therefore, the stock object should store all this  information. Perform the following operations on each stock object: i. Set the stock information. ii. Print the stock information. iii. Show the different prices. iv. Calculate and print the percent gain/loss. v. Show the number of shares. a.1. The natural ordering of the stock list is by stock symbol. Overload the relational operators to compare two  stock objects by their symbols. a.2. Overload the insertion operator, <<, for easy output. a.3. Because the data is stored in a file, overloa For example, suppose infile is an ifstream object and the input file  was opened using the object infile. Further suppose that myStock is a stock object. Then, the statement infile >> myStock; reads the data from the input file and stores it in the object myStock.  B. Now that you have designed and implemented the class stockType to implement a stock object in a program, it is time to create a list of stock objects. Let us call the class to implement a list of stock objects stockListType. The class stockListType must be derived from the class listType, which you designed and implemented in the previous exercise. However, the class stockListType is a very specific class, designed to create a list of stock objects. Therefore, the class stockListType is no longer a template. Add and/or overwrite the operations of the class listType to implement the necessary operations on a stock list. The following statement derives the class stockListType from the class listType. class stockListType: public listType { member list }; The member variables to hold the list elements, the length of the list, and the maximum size of the list were declared as protected in the class listType. Therefore, these members can be directly accessed in the class stockListType. Because the company also requires you to produce the list ordered by the percent gain/loss, you need to sort the stock list by this component. However, you are not to physically sort the list by the component percent gain/loss. Instead, you will provide a logical ordering with respect to this component. To do so, add a member variable, an array, to hold the indices of the stock list ordered by the component percent gain/loss. Call this array sortIndicesGainLoss. When printing the list ordered by the component percent gain/loss, use the array sortIndicesGainLoss to print the list. The elements of the array sortIndicesGainLoss will tell which component of the stock list to print next.  c. Write a program that uses these two classes to automate the company’s analysis of stock data

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Hello I am having some issues getting this code to run cleanly in c ++ and was wondering if someone could help. Since i can not attach directly please find all files needed here https://drive.google.com/file/d/17UsMDZNJ_7ne1mqV3rRyuaKWxjwvWISR/view?usp=sharing
Here is the assignment;

Stock Market) Write a program to help a local stock trading company 
automate its systems. The company invests only in the stock market. 
At the end of each trading day, the company would like to generate 
and post the listing of its stocks so that investors can see how their 
holdings performed that day. We assume that the company invests in, 
say, 10 different stocks. The desired output is to produce two listings, 
one sorted by stock symbol and another sorted by percent gain from 
highest to lowest.
The input data is provided in a file in the following format:
symbol openingPrice closingPrice todayHigh todayLow
prevClose volume

The first line indicates that the stock symbol is MSMT, today’s opening 
price was 112.50, the closing price was 115.75, today’s high price was 
116.50, today’s low price was 111.75, yesterday’s closing price was 
113.50, and the number of shares currently being held is 6723823. 
The listing sorted by stock symbols must be of the following form: 
********* First Investor's Heaven **********
********* Financial Report **********
Stock Today Previous Percent
Symbol Open Close High Low Close Gain Volume
------ ----- ----- ----- ----- -------- ------- ------
 ABC 123.45 130.95 132.00 125.00 120.50 8.67% 10000
 AOLK 80.00 75.00 82.00 74.00 83.00 -9.64% 5000
 CSCO 100.00 102.00 105.00 98.00 101.00 0.99% 25000
 IBD 68.00 71.00 72.00 67.00 75.00 -5.33% 15000
 MSET 120.00 140.00 145.00 140.00 115.00 21.74% 30920
Closing Assets: $9628300.00
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


Develop this programming exercise in two steps. In the first step (part 
a), design and implement a stock object. In the second step (part b), 
design and implement an object to maintain a list of stocks.
a. (Stock Object) Design and implement the stock object. Call the 
class that captures the various characteristics of a stock object 
stockType.


A. The main components of a stock are the stock symbol, stock price, 
and number of shares. Moreover, we need to output the opening 
price, closing price, high price, low price, previous price, and the 
percent gain/loss for the day. These are also all the characteristics of a stock. Therefore, the stock object should store all this 
information.
Perform the following operations on each stock object:
i. Set the stock information.
ii. Print the stock information.
iii. Show the different prices.
iv. Calculate and print the percent gain/loss.
v. Show the number of shares.
a.1. The natural ordering of the stock list is by stock symbol. Overload the relational operators to compare two 
stock objects by their symbols.
a.2. Overload the insertion operator, <<, for easy output.
a.3. Because the data is stored in a file, overloa
For example, suppose infile is an ifstream object and the input file 
was opened using the object infile. Further suppose that myStock
is a stock object. Then, the statement
infile >> myStock;
reads the data from the input file and stores it in the object myStock. 

B. Now that you have designed and implemented the class stockType to implement a stock object in a program, it is time to create a list of stock objects. Let us call the class to implement a list of stock objects stockListType. The class stockListType must be derived from the class listType, which you designed and implemented in the previous exercise. However, the class stockListType is a very specific class, designed to create a list of stock objects. Therefore, the class stockListType is no longer a template. Add and/or overwrite the operations of the class listType to implement the necessary operations on a stock list. The following statement derives the class stockListType from the class listType. class stockListType: public listType { member list }; The member variables to hold the list elements, the length of the list, and the maximum size of the list were declared as protected in the class listType. Therefore, these members can be directly accessed in the class stockListType. Because the company also requires you to produce the list ordered by the percent gain/loss, you need to sort the stock list by this component. However, you are not to physically sort the list by the component percent gain/loss. Instead, you will provide a logical ordering with respect to this component. To do so, add a member variable, an array, to hold the indices of the stock list ordered by the component percent gain/loss. Call this array sortIndicesGainLoss. When printing the list ordered by the component percent gain/loss, use the array sortIndicesGainLoss to print the list. The elements of the array sortIndicesGainLoss will tell which component of the stock list to print next. 


c. Write a program that uses these two classes to automate the company’s analysis of stock data

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Linux
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education