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 21:00
Kirk found a local community college with a two-year program and he is comparing the cost with that of an out-of-state two-year school. what is the expected total cost for one year at the local community college if kirk lives at home? what is the expected total cost for one year at the out-of-state school if kirk lives on campus?
Answers: 2
question
Computers and Technology, 23.06.2019 11:20
Http is the protocol that governs communications between web servers and web clients (i.e. browsers). part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. some of the codes and their meanings are listed below: 200, ok (fulfilled)403, forbidden404, not found500, server errorgiven an int variable status, write a switch statement that prints out the appropriate label from the above list based on status.
Answers: 2
question
Computers and Technology, 24.06.2019 06:30
Ineed to know the anwser to all these questions
Answers: 2
question
Computers and Technology, 24.06.2019 16:50
Ramp charts are generally created in wordlotusexcelpowerpoint
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
Mathematics, 25.11.2020 22:30
Questions on the website: 13722361