Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The assumptions for this part are: 1. The array can have any number of elements. 2. The elements can hold any valid integer value,
The assumptions for this part are: 1. The array can have any number of elements. 2. The elements can hold any valid integer value, positive or negative. 3. The absolute sum of any two adjacent elements will be less than 300. Part 3 - 2-Dimensional Array Special Product Your task is to implement the code to meet the requirements listed below. In replit.com, within the ClassUtilities.java file, you will be editing the product Dimension method. This method receives one integer 2-dimensional array as a parameter. Your task is to find the product each of the elements in a column (as shown below), and then return an array of the products. For example, if the one integer 2-dimensional array passed in is: ArrayOne = { [2, 4, 6}, {3, 5, 7}, {8, 10, 12}} It can be represented as the following table: ArrayOne [0] [0] ArrayOne [1] [0] ArrayOne [2] [0] And the values represented as: 2 3 8 ArrayOne [0] [1] ArrayOne [1] [2] ArrayOne [2] [1] 4 ReturnArray = { 48, 90, 504 } 5 10 ArrayOne [0] [2] ArrayOne [1] [2] ArrayOne [2] [2] 6 7 12 Then the array that you will need to return would be the product of the columns, which would be: The assumptions for this part are: 1. The array can have any number of elements, but each dimension will have the same number. 2. The elements can hold any valid integer value, positive or negative. Final Project This final project is all about our eBook through chapters 9 exercises, readings and our class lectures. There are three parts to this project. Part 1 - Common Elements Your task is to implement the code to meet the requirements listed below. In replit.com, within the ClassUtilities.java file, you will be editing the commonElements method. This method receives three integer arrays as parameters. Your task is to find the common elements between the three arrays, and then return an array with the common elements. For example, if the three integer arrays passed in are: ArrayOne = { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 } ArrayTwo { 4, 5, 6, 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25} ArrayThree { 5, 6, 14, 15, 16, 23, 24, 25 } Then the array that you will need to return would be: = = ReturnArray = { 14, 15, 16 } The assumptions for this part are: 1. Each array can have any number of elements and they do not need to be the same. 2. The elements can hold any valid integer value, positive or negative. Part 2 - Prime Numbers Your task is to implement the code to meet the requirements listed below. In replit.com, within the ClassUtilities.java file, you will be editing the prime Numbers method. This method receives one integer array as a parameter. Your task is to find the sum of any two adjacent elements, add them together, get the absolute value, and then determine if that number is a prime number. You will then return an array of the prime numbers. For example, if the one integer array passed in is: ArrayOne = { 3, 5, 2, -21, 7, 16 } Then the array that you will need to return would be: ReturnArray = {7, 19 }
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