C++ program 代码代编码代做、代写 C++ stock price
Guideline of Assignment
Let us assume that you are an investor who holds a portfolio of stocks. You need to design a C++ program to maintain and manage stock price information of 7 days.
General Features and Functions
? Basic features: the program should be able to
1) Store the portfolio information into a 2-dimentional array(N × 8) of String type. The first column of the array for stock code, and the rest columns for 7-day prices. You may declare the total number of stocks as a constant valued 10 (i.e., N = 10), and initialize the array by setting code to the string “NULL” and prices 0. Below is an exemplar portfolio with 2 stocks.
02800 31.25 32.5 33.7 33.2 35.8 35.1 30.7
03700 419.6 422.3 421.7 429.2 411.9 412.6 410.1
NULL 0 0 0 0 0 0 0
N NULL 0 0 0 0 0 0 0
NULL 0 0 0 0 0 0 0
2) Add a new stock into the portfolio to an available place (input: code and 7 prices). If no available space left (all rows are 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)
o Note 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)
o Note 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)
o Stock code: a random 4-digit in the range of 1000-4999
o Price: a double number between [0, 100), in the format of, for example, 28.3. Note that it is 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
o See an exemplar interface as in the given sample code (SampleUserInterface.cpp)
o For your reference, see an exemplar system coded by me, run the file “PortfolioManager.exe” to try my demo program. Note that other files in the same package are supporting library files that should be put in the same folder as the .exe file).
o However, feel comfortable to design an interface that you prefer, either simplified or feature-richer.
- How to cast between string, double, and integer
o see the given sample code “StringSampleCode.cpp”
- How to format a number-like string
o see the given sample code “StringSampleCode.cpp”
- How to validate user input
o see the given sample code “StringSampleCode.cpp”
http://www.6daixie.com/contents/13/1346.html
我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写代做编程语言或工具包括但不限于以下范围:
C/C++/C#代写
Java代写
IT代写
Python代写
辅导编程作业
Matlab代写
Haskell代写
Processing代写
Linux环境搭建
Rust代写
Data Structure Assginment 数据结构代写
MIPS代写
Machine Learning 作业 代写
Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导
Web开发、网站开发、网站作业
ASP.NET网站开发
Finance Insurace Statistics统计、回归、迭代
Prolog代写
Computer Computational method代做
因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:[email protected]
微信:codinghelp
原文地址:https://www.cnblogs.com/rrrrrrrrr/p/8974693.html