Stock Program FUNCTIONS.

Added on - 16 Sep 2019

  • Dissertation

    type

  • 1

    pages

  • 346

    words

  • 89

    views

  • 0

    downloads

Showing pages 1 to 1 of 1 pages
Stock ProgramFUNCTIONSYou are the treasurer of the Investment Club. Listed below are the stocks in your portfolio.StockNumberof SharesColumbia Sportswear15Dean Foods20Harley Davidson12At each meeting you are required to give a report the value of the stocks in the portfolio. You decide to write aprogram (using functions, of course) to calculate the current worth of each stock.In the main scope of the program, create global constants for the stock name and number of shares (thisdata doesn’t change each month).Write a function to input for the current price of the stock (this changes constantly). Include the name ofthe company in each question (as a variable).What is the current price of Columbia Sportswear? 44.47What is the current price of Dean Foods? 36.68What is the current price of Harley Davidson? 49.08Write a function to calculate the current value for each company.Write a function to display the following...Wall Street SocietyTreasurer: Your NameCompany Name# of SharesPriceCurrent ValueColumbia Sportswear1544.47667.05Dean Foods2036.68733.60Harley Davidson1249.08588.96Extra Credit:Write a function to ask if any portfolio changes have been made. If the user answers yes, allow them tochange the number of shares for the company that they choose. For example...Are there any changes to your portfolio (y or n)? yWhich company's shares changed? Dean FoodsHow many shares of Dean Foods do you own now? 25Thanks! Your records have been updated.Company Name# of SharesPriceCurrent ValueColumbia Sportswear1544.47667.05Dean Foods2536.68917.00Harley Davidson1249.08588.96
desklib-logo
You’re reading a preview
card-image

To View Complete Document

Become a Desklib Library Member.
Subscribe to our plans

Unlock This Document