Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in java please Problem #3: [25 pts] Arrays and Methods [10 pts] Write a method called checkArrays that accepts as parameters two arrays of integer

in java please
image text in transcribed
Problem #3: [25 pts] Arrays and Methods [10 pts] Write a method called checkArrays that accepts as parameters two arrays of integer (A and B of the same size) and returns another array of integers (C) initialized as follows: Cli = 1 if B[i] divides A[i], otherwise C[i] -0. For example: A 12 20 430 17 B 3 6 24 | 15 9 C 10 010 Use the following method header: public static int[] checkArrays (int) A, int[ 1 B) 15 pts] Write a void method called printArray that accepts as parameters an array of integers and print its values. Use the following method header: public static void printArray (int 1 arr) [10 pts] Write a main method to test the above methods as follows: - Declare and initialize 2 integer arrays (arrayA and arrayB) of size 5 (fill the 2 arrays with random integers between 1 and 100). - Invoke the method printArray to display the values stored in the two arrays. - Invoke the method checkArrays and pass to it the two arrays arrayA and arrayB. - Invoke the method printArray to display the values of the new array(arrayC). Sample Run: ArrayA: 12 ArrayB: 3 Arrayc: 1 20 6 O 4 30 17 24 15 9 0 1 0 u o ON

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

Step: 3

blur-text-image

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

Oracle PL/SQL Programming Database Management Systems

Authors: Steven Feuerstein

1st Edition

978-1565921429

More Books

Students also viewed these Databases questions

Question

3. Who would the members be?

Answered: 1 week ago

Question

What was the role of the team leader? How was he or she selected?

Answered: 1 week ago