Question
CS173 HW 06 This homework is an exercise with arrays. Your program will generate two random array containing integers on [4,24] and print out which
CS173 HW 06
This homework is an exercise with arrays. Your program will generate two random array containing
integers on [4,24] and print out which values are common to both arrays. The size of each array is a
randomly generated value on [20,30].
Your program should have the following:
1. A method that prints out an introduction saying what the program does
2. A method that generates a random integer on an inclusive interval.
3. A method that generates one array that adheres to the above specifications
4. A method that compares two integer arrays and returns an array of common values. If there are
no common values, the method should return an empty array.
5. A method that prints each of the two original arrays in ascending sorted order as well as the
result array in sorted order.
6. The main should be very small and consist of calls to each of these methods
7. At the class level (meaning this code should go right under the line that says class HW06 or
whatever you call it) you should define final integers for each of the range boundaries. Ie
public static final int ARRAY_VALUE_LOW = 4;
public static final int ARRAY_VALUE_HIGH = 55;
***PLEASE CODE IN JAVA***
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started