Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The more a student studies for the class, the better chances of succ sity norm i

ID: 3918065 • Letter: T

Question

The more a student studies for the class, the better chances of succ sity norm is that for each hour in class, a student must study 3.5 hours at home.Let us write a program that would help a student analyze how much he or she studied. The program should ask for a student's name, number of days, and the hours studied on each day. Place these numbers-of-hours into anfarray hours of the corresponding size. Based on the values stored in this array, compute: iver- number of the average number of hours per day that the student studied; the largest number of hours that the student studied, and the smallest number of hours that the student studied. . After computations, the program should print a report containing the student's name and these three numbers. Example: Let us assume that the student Jane Doe studied for 23 hours on Day 1 (this was before the test), for 0 hours on Day 2 (too tired and sleepy), and 3 hours on Day 3. In this case, the average number of hours is (23+0 3)/3 -8.67, the largest was 23, the smallest was 0. The report should then look something like this: Dear Jane Doe, Here are the statistics about your study time: * on average, you studied for 8.67 hours/day * your largest study time was 23 hours * your smallest study time was ? hours. Good luck on your next test! Extra Credit For extra credit: make the computations of average, largest value, and smallest value separate methods.

Explanation / Answer

public class PreparationHours { public static int maximum(int[] hours) { int temp = hours[0]; for(int i = 0; i temp) { temp = hours[i]; } } return temp; } public static int minimum(int[] hours) { int temp = hours[0]; for(int i = 0; i