Question: 3-(Code only) Write a program that helps the user determine the performance of a stock given its recent prices. First ask the user how many

 3-(Code only) Write a program that helps the user determine the

3-(Code only) Write a program that helps the user determine the performance of a stock given its recent prices. First ask the user how many stock prices they wish to enter (n). Then read n prices and store them into an array. After you have stored all input, display the following: The highest seen price of the stoclk The lowest seen price of the stock The average price of the stock over the period If the overall trend is gain or lose (is the last price higher or lower than the first?) Round all output to 2 decimal places wherever you are printing prices. Name your main class Hw4pr3 and your file Hw4pr3.java

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!