You have chosen to sponsor your bid up to a maximum amount of .
Write a program that computes an invoice for purchasing shares of stock.
A brokerage company has implemented policy to encourage investors to buy shares in even lots of
100. Therefore, the minimum order is 100 shares of stock. The commission charge for the first 100
shares is $2.55. An additional commission of 2 cents per share is charged for all shares over 100
The program must:
• Define an integer constant that holds the minimum number of shares that can be ordered.
• Define two floating point constants that will hold:
o The minimum order commission
o The commission for each share over the minimum order
• Define a string constant for the investor’s name – use YOUR name
(e.g., "Samantha Washington")
• Define two character constants for the investor’s initials – use YOUR initials
(e.g., 'S' and 'W')
• Define an integer variable to store the total number of shares purchased (read from the
• Define an floating point variable to store the cost of one share of stock (read from the user)
• Define two floating point variables to store parts of the total cost.
o The cost of all shares ordered
o The commission charged for additional shares over the minimum order
• Display a program description, followed by several prompts and input statements to read
the total number of shares purchased from the user, and the price per share.
o You may assume that the number of shares entered by the user will always be at least
as many as the minimum order requirement
Stock Purchase Invoice Program
Enter number of shares purchased: 176
Enter the price per share: 4.39
• Calculate the three parts of the total cost.
• Add all of the above costs together to determine the total bill.
• Add any other variable definitions or calculation statements you think are needed to perform
• Output statements to display the results to the console, in the following format:
Investor: Samantha Washington (SW)
Shares purchased: 176
Price per share: 4.39
Cost for all shares 772.64
Commission for minimum order 2.55
Commission for additional shares 1.52
Total Billed to Investor Account: 776.71
o Display a few blank lines to separate the input from the output.
o The dollar figures in the totals column should all line up on the decimal point.
o If only the minimum number of shares is purchased,
the commission for additional shares will be 0.00.
Thank you for your help and I hope to hear from you soon.