subject

For this program you are given a String that represents stock prices for a particular company 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 always assume tha the 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:
// First run
Please enter stock prices: 1,22,30,38,44,68,49,73, 52,66
Highest price: 73 ocurred on day # 7
Lowest price: 1 occurred on day # 0
// pecond run
Please enter stock prices: stock_prices - 41,37,40,54,51,63,54,47,23,33
Highest price: 63 occurred on day # 5
Lowest price: 23 accurred on day # 8
Write your program on the following page. You can use this page for rough work.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
The isometric projection camera technique provides an illusion of perspective by using things like parallax scrolling to create the illusion of 3d in a 2d game
Answers: 3
question
Computers and Technology, 23.06.2019 16:30
How to do this programming flowchart?
Answers: 3
question
Computers and Technology, 23.06.2019 22:20
What is a programming method that provides for interactive modules to a website?
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
These statements describe lists in presentation programs: a. bullets can be turned off and on. b. bullets cannot be turned off. c. bullet styles, colors, and sizes can be changed. d. lists don't have to use bullets or numbers. e. numbering styles, colors, and sizes can be changed. f. numbers can be turned off and on. g. numbers cannot be turned off. select all that apply
Answers: 2
You know the right answer?
For this program you are given a String that represents stock prices for a particular company over a...
Questions