C + + program code generation, generation, write C + + stock price

Source: Internet
Author: User

C + + program code generation, generation, write C + + stock price
Guideline of assignment
Let us assume this is a investor who holds a portfolio of stocks. You need to design a C + + program to maintain and manage the stock price information of 7 days.
General Features and Functions
? Basic Features:the program should is able to
1) Store The Portfolio information into a 2-dimentional array (Nx8) of String type. The first column of the array for stock code, and the rest columns for 7-day prices. Declare the total number of stocks as a constant valued (i.e., N = ten), and initialize the array by setting cod E to the string "NULL" and prices 0. Below is a exemplar portfolio with 2 stocks.

0280031.2532.533.733.235.835.130.7

03700419.6422.3421.7429.2411.9412.6410.1

NULL0000000

NNULL0000000


NULL0000000

2) Add a new stock into the portfolio to an available place (Input:code and 7 prices). If No available space left (all rows is occupied), print the error message accordingly.
3) Retrieve a stock (Input:stock code). If found, display all 7 prices, and the lowest, highest, and average price.
4) Modify The price of a stock on a certain day (Input:stock code, day and new price)
Onote that only a-stock that exists in the portfolio can be changed.
5) Delete a stock (the whole record, including its prices; Input:stock code)
Onote that only a-stock that exists in the portfolio can be deleted.
6) Display the entire portfolio
7) Populate random values into the entire portfolio (for testing purpose)
Ostock code:a Random 4-digit in the range of 1000-4999
OPRICE:A double number between [0, +], in the format of, for example, 28.3. Note that it's saved as a string in the array

? Bonus Features
8) User input Validation:check If user input is valid and prompt if not (e.g., a valid price)
9) Feel free to add any other relevant features to your system
? Hints
-user interface and Features
Osee an exemplar interface as in the given sample code (SAMPLEUSERINTERFACE.CPP)
Ofor your reference, see a exemplar system coded by me, run the file ' PortfolioManager.exe ' to try my demo program. Note that other files in the same package is supporting library files that should is put in the same folder as the. exe F ile).
Ohowever, feel comfortable to design a interface that you prefer, either simplified or feature-richer.
-how to cast between string, double, and integer
Osee The given sample code "StringSampleCode.cpp"
-how to format a number-like string
Osee The given sample code "StringSampleCode.cpp"
-how to validate user input
Osee The given sample code "StringSampleCode.cpp"
Http://www.6daixie.com/contents/13/1346.html

Our Direction field: Window Programming numerical algorithm AI Artificial Intelligence financial statistical Metrology analysis Big Data network programming Web programming Communication Programming game Programming Multimedia Linux plug-in programming API image processing embedded/Microcontroller database programming console process and thread Network security assembly language Hardware programming software Design Engineering Standard Rules. The generation of programming languages or tools including, but not limited to, the following ranges:

C/c++/c# Write

Java Write generation

It generation

Python writes

Tutoring Programming Jobs

The MATLAB Generation writes

Haskell writes

Processing Write

Linux Environment Setup

Rust Generation Write

Data Structure assginment Data structure generation

MIPS Generation Writing

Machine Learning Job Writing

Oracle/sql/postgresql/pig database Generation/Generation/Coaching

Web development, Web development, Web site jobs

Asp. NET Web site development

Finance insurace Statistics Statistics, regression, iteration

Prolog write

Computer Computational Method Generation

Because of professional, so trustworthy. If necessary, please add qq:99515681 or e-mail:[email protected]

: Codinghelp

C + + program code generation, generation, write C + + stock price

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.