Question: Write a Java program named RandomNumbers that generate 10 random integer numbers between 8 and 25 inclusive and store them in an array named numberList.

 Write a Java program named RandomNumbers that generate 10 random integer

numbers between 8 and 25 inclusive and store them in an array

Write a Java program named RandomNumbers that generate 10 random integer numbers between 8 and 25 inclusive and store them in an array named numberList. Then the program should do the following: (1, 2, 2 marks) a) Display the array numberList. b) Display the average of the numbers in the array numberList. c) Display how numbers in the array are greater than the average. Sample Run of the Program The random generated array is : 15 28 10 19 23 8 27 9 20 10 The average of the array numbers is 16.9 There are 5 numbers greater than the average a) Write a method with the following header to display an integer in reverse order: public static void reverse(int number) For example, reverse(3456) displays 6543. Write a test program that prompts the user to enter an integer then displays its reversal. (2 marks) b) Write a method with the following header to check if a number is palindrome. A number is a palindrome if its reversal is the same as itself. // Return true if number is a palindrome public static boolean is Palindrome(int number) (Hint: user the reverse method of part a.) Write a test program that prompts the user to enter an integer and reports whether the integer is a palindrome. (1 mark) c) Write a method that finds the number of occurrences of a specified character in a string using the following header: public static int count(String str, chara) For example, count("Welcome", 'e') returns 2. Write a test program that prompts the user to enter a string followed by a character then displays the number of occurrences of the character in the string. (2 marks)

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!