Question: Java programming Write a Java program named Counter that performs the following tasks: [2, 1, 1, 1 Marks] a. Generates 15 random integer numbers (their

Java programming

Write a Java program named Counter that performs the following tasks: [2, 1, 1, 1 Marks] a. Generates 15 random integer numbers (their range must be between -10 and 10 inclusive) and store them in a single-dimensional array. b. Displays the array elements. c. Count and display how many negative numbers in the array. d. Calculate and display the sum of the odd numbers in the array. For example, if the random numbers were stored in the array are: -2 -8 3 -4 -6 3 -2 7 5 9 8 8 -5 7 -7 Then the program should display: The array elements are: -2 -8 3 -4 -6 3 -2 7 5 9 8 8 -5 7 -7 The number of negative numbers is: 7 The sum of the odd numbers is: 22

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!