Stock Market Write a Program to Help a Local Stock Trading Company

share via whatsapp

share via whatsapp

  1. Home
  2. »
  3. Questions
  4. »
  5. Computer Science
  6. »
  7. Programming Languages
  8. »
  9. Programming In C/C++
  10. »
  11. Write a program to help a local stock trading...

Write a program to help a local stock trading company automate its systems. The company invests... 1 answer below »

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 openingPriceclosingPricetodayHightodayLowprevClose volume
For example, the sample data is:
MSMT 112.50 115.75 116.50 111.75 113.50 6723823
CBA 67.50 75.50 78.75 67.50 65.75 378233
.
.
.
.
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:
please refer to the book on page 941! It's a lot to type!
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.
Part a:
(Stock Object) Design and implement the stock object. Call the class that captures the various characteristics of a stock object stockType.

Document Preview:

(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 For example, the sample data is: MSMT 112.50 115.75 116.50 111.75 113.50 6723823 CBA 67.50 75.50 78.75 67.50 65.75 378233 . . . . 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: please refer to the book on page 941! It's a lot to type! 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. Part a: (Stock Object) Design and implement the stock object. Call the class that captures the various characteristics of a stock object stockType. 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: 1. Set the stock information. 2. Print the stock information. 3. Show the...

Couldn't Find What You Were Looking For ?

Ask Your Question Now!

Get it solved from our top experts within 48hrs!

Stock Market Write a Program to Help a Local Stock Trading Company

Source: https://www.transtutors.com/questions/write-a-program-to-help-a-local-stock-trading-company-automate-its-systems-the-compa-2360483.htm

2 Responses to "Stock Market Write a Program to Help a Local Stock Trading Company"

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel