Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Logics For Databases And Information Systems

Authors: Jan Chomicki ,Gunter Saake

1st Edition

1461375827, 978-1461375821

More Books

Students also viewed these Databases questions

Question

What is Centrifugation?

Answered: 1 week ago

Question

To find integral of ?a 2 - x 2

Answered: 1 week ago

Question

To find integral of e 3x sin4x

Answered: 1 week ago

Question

To find the integral of 3x/(x - 1)(x - 2)(x - 3)

Answered: 1 week ago

Question

What are Fatty acids?

Answered: 1 week ago

Question

7. Define cultural space.

Answered: 1 week ago

Question

8. Describe how cultural spaces are formed.

Answered: 1 week ago