Question: Create a class GroupExcercise In Java that would ask the user to perform the following: - Using an array of 15 integers, assign the value

Create a class GroupExcercise In Java that would ask the user to perform the following:


- Using an array of 15 integers, assign the value of 1 to the first array element.
- Then, each succeeding element should have twice the value of its predecessor. 
- Compute for the sum and average then display the results.

Results must be: 
1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
Sum of all the inputs: 32767
Average of the inputs: 2184

Step by Step Solution

3.46 Rating (162 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

CODE import javautilArrays public class GroupExercise public static void mainStr... View full answer

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 Programming Questions!