subject

Stock Market For this program you are given a String that represents stock prices for a particular com- y over a period of time. For example, you may be given a String that looks like the following:
String stockPrices = "1,22,30,38,44,68,49,73,52,66";
Each number in this String represents the stock price for a particular day. The first number is day 0, the second number is day 1, and so on. You can al supplied string will formatted using commas to separate daily stock prices. The individual stock prices will always be valid integers, but they many not always be the same number of digits (i. e. 1 is a valid stock price, as is 1000. Your program should work with strings of any length. The "split" method might come in handy for this problem. Your task is to analyze the supplied string and determine the following:
• The highest price for the stock
• The day when the highest price occurred
• The lowest price for the stock
• The day when the lowest price occurred
Here are two sample runnings of the program:
1 // First run
2 Please enter stock prices: 1,22,30,38,44,68,49,73,52,66
3 Highest price: 73 occurred on day # 7
4 Lowest price: 1 occurred on day # 0
5 // second run
6 Please enter stock prices: stock_prices = 41,37,40,54,51,63,54,47,23,33
7 Highest price: 63 occurred on day # 5
8 Lowest price: 23 occurred on day # 8

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:00
Which best describes the condition under which the unicode output is the same as plain text?
Answers: 3
question
Computers and Technology, 22.06.2019 10:10
3. bob is arguing that if you use output feedback (ofb) mode twice in a row to encrypt a long message, m, using the same key each time, it will be more secure. explain why bob is wrong, no matter what encryption algorithm he is using for block encryption (15 points).
Answers: 3
question
Computers and Technology, 23.06.2019 18:40
How does is make you feel when you're kind to others? what are some opportunities in your life to be more kind to your friends and loved ones? imagine a world where kindness has be outlawed. how would people act differently? would your day-to-day life change significantly? why or why not?
Answers: 2
question
Computers and Technology, 24.06.2019 22:30
When can you access the bios setup utility?
Answers: 1
You know the right answer?
Stock Market For this program you are given a String that represents stock prices for a particular...
Questions
question
History, 07.04.2020 19:58
question
Mathematics, 07.04.2020 19:58
question
Mathematics, 07.04.2020 19:58
question
Social Studies, 07.04.2020 19:58
Questions on the website: 13722363