Question: * Using Processing program (Java) to complete the following You will create a program that averages products over a given amount of days. Your program
*Using Processing program (Java) to complete the following
You will create a program that averages products over a given amount of days. Your program initially reads in an array, where an element in the array represent the number of products sold for one day. Your program processes each day from the array until your program encounters the value -789 in the array. The number -789 signals your program to stop reading products sold from the array, and proceed to calculate the average (arithmetic mean) of the products sold. Once the average is calculated, display the results on the canvas as: In 'n' days, the average products sold is 'u' units. The variable n represents the number of days you program reads in from the array. The variable u represents the average units sold over those days.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
