CIS 1111 Programming Topic 6 – Stockmarket Portfolio Tracker

(20 Points)

Description:
In this assignment, you will develop a C++ program that calculates gain or loss of a stock you purchased.  Go to the website “Yahoo! Finance” and select a technology stock for your assignment. Some examples of technology stocks include Apple, Cisco, IBM, Teradata, etc….

In your program, the user will enter the following pieces of information:

•    the name of the stock
•    the stock symbol
•    the number of shares purchased
•    the purchase price
•    the commission paid

Requirements for Your Program:

Here are additional requirements for your program:

1.    Have the user enter the company name and stock symbol
2.    Have the user enter the number of shares purchased
3.    Have the user enter the price per share, sharePrice.
4.    Calculate the sharesCost which is the number of shares * price per share
5.    When you purchase stock you need to pay a commission based on the number of shares times the purchase price.
6.    Add the sharesCost to the commission to calculate total cost of purchase
7.    In order to simulate what the value of the stock is now, use a random number generator. The generator will generate a number between 1 and 100 but since you want a percentage, divide the number generated by 100. See pages 127-129 for how to create a random number and do not forget to seed the random number generator.
8.    To determine if the change in the stock value is positive or negative (the stock market can go down or up), toss a coin to generate a random outcome (gain or loss). Below is the code for flipping a coin.
9.    Multiply percentage from step 7 by the profitLoss which will make the percentage positive or negative.
10.    Multiple percentage from step 9 by the sharePrice and add it back to the sharePrice. Your formula will look like this NewSharePrice = (percentGain * sharePrice) + sharePrice
11.    Calculate the new value of your shares multiple the newSharePrice times the number of shares.
12.    Now you are going to sell your shares.  When you sell stock you need to pay commission to your broker.  The profit (or loss) you make will be what you paid for the stock (including the commission) minus what you netted from the sale (the new value of your shares minus the commission).
13.    Did you make money or lose money on your stock purchase? Calculate your gain or loss.
14.    Your rate of return is your profit divided by the original cost.

Be sure to…

1.    Use variables of the appropriate data type to store inputs, subtotals and totals, and outputs.
2.    Variable names must be descriptive
3.    Use cout to output the values to the console. Your cout statement must use the variables to display the values.
4.    Use the random number generator to generate the gain and whether it is a loss or a gain.
5.    Output must be labeled and easy to read as shown in the sample output below.
6.    Program must be documented with the following:
a.    // Name
b.    // Date
c.    // Program Name
d.    // Description

Sample output

Submit:
Zipped folder named LastNameFirstNameCIS1111NameOfAssignment which contains:
1. Your .cpp file
2. Screen shots of your code and output
Grading Guidelines for This Assignment
Range – Low End
(Did not do or did very little effort)    Range – High End
(Used correctly and spent time/effort on programming)
Names of variables are meaningful and the program comments self-document the program    0    2
Met all stated requirements    0    10
Output is correct given the input, and the output is correctly formatted    0    4
Program compiles and executes without any runtime, syntax, or logic errors    0    3
The zipped project folder that includes the C++ .cpp source files and screens shots of the code and console is uploaded to drop box.     0    1
Total Points Possible    0    20

Place this order with us and get 18% discount now! to earn your discount enter this code: special18 If you need assistance chat with us now by clicking the live chat button.

© 2020 customphdthesis.com. All Rights Reserved. | Disclaimer: for assistance purposes only. These custom papers should be used with proper reference.