ITEC 120 Lab Quiz 4

Lab Quiz 4 - Frank's pizza daily sales
Due at the end of lab period.
Submit labquiz4.java to a folder called RU8 in your folder on neelix.

You'll report total sales, average daily sales, the highest daily sales, and last, the sales amount for each day.

Write a program which will:

• read in an integer which will tell you how many dollar amounts you will be given to read in
• read in that many dollar amounts, one at a time, from the keyboard.
• store the values in an array
• find the highest daily sales amount
• add up the total of all the values in the array
• output (in this order):
• total
• average daily sales
• the highest daily sales
• all of the values in the array on one line (in the same order you read them in)

Sample run:

 Program outputs: How many amounts are there? User inputs: 5 Program outputs: Enter sales for day1: User inputs: 56.76 Program outputs: Enter sales for day2: User inputs: 78.39 Program outputs: Enter sales for day3: User inputs: 105.40 Program outputs: Enter sales for day4: User inputs: 98.00 Program outputs: Enter sales for day5: User inputs: 112.50 Program outputs: Total sales was: 451.05 Average daily sales was: 90.21000000000001 The highest sale was 112.5 Daily sales: 56.76   78.39   105.4    98.0   112.5

Extra credit possible!

• 10 points extra for formatting all numbers as dollar amounts.