Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

complete in c++ programming An Equity is a stock or share of a company that is traded in Equity Markets such as the NY Stock

image text in transcribedimage text in transcribed

complete in c++ programming An Equity is a stock or share of a company that is traded in Equity Markets such as the NY Stock Exchange. Typically, the stocks of a company is assigned a symbol (e.g. Apple Inc. 's stocks have the Symbol AAPL). when someone buys stocks, they buy certain number of stocks (called volume) at a certain price as dictated by the stock market. Everyday, when the stock market is open, stocks start at an opening price and at the end of the day, the stocks have a closing price Design a Stock class that has data members for the following: - Symbol - Volume - Opening Price - Closing Price - Buy Price The class should be appropriately designed and be properly encapsulated - It should have meaningful names and accessibility for the data members - It should have appropriate accessor for all data members - It should have appropriate mutator for all data members - It should have an appropriate member function that computes current holding (H) - Hvolume * buy price - It should have an appropriate member function that computes holding at market open (OH) - HMOvolume* opening price - It should have an appropriate member function that computes holding at market close (CH) - HMCvolume* closing price In your main program: 1. Create an array of 5 Stock objects. 2. In a loop ask the user to enter the data for 5 stock objects in your array: - Symbo1, volume, Buy Price, Opening Price, and Close Price - Use the mutators of your class to set the data 3. In another 1oop cal1 the appropriate object methods to compute H, HMO, and HMC for the 5 stocks in your stock array, and display the results. The Display can be like this (assuming user entered these symbols)

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

Beginning ASP.NET 4.5 Databases

Authors: Sandeep Chanda, Damien Foggon

3rd Edition

1430243805, 978-1430243809

More Books

Students also viewed these Databases questions

Question

LO4 Provide an overview of four challenges facing HR today.

Answered: 1 week ago