Arrays Test CHS Programming 1 Create three different classes, one for each problem below. You must include the listed arrays and should not use any Array methods. You may use the loop type of your...

No questions.


Arrays Test CHS Programming 1 Create three different classes, one for each problem below. You must include the listed arrays and should not use any Array methods. You may use the loop type of your choice for each problem. Each problem must include: • Array declaration • Array Initialization • Loop to traverse the entire Array at least once. • Change the value of at least one element in the Array. • Calculate a value based on the contents of the Array. Part 1: Integer Array 1. Create a class that includes an integer array with a length of your choice. 2. Initialize the elements of the array with values other than zero. 3. After the array is initialized change each odd value in the array to an even value. 4. Print the values in the array on multiple lines that are close to even in length. (example: 5 per line) 5. Display the sum of all the values in the Array. Part 2: Double Array 1. Create a class that includes a double array with a length of your choice. 2. Initialize the elements of the array with values other than zero. 3. Create a second double array of the same length as the first. 4. Initialize the elements of the second array with the square root of the parallel first array. This counts as changing a value in the Array. 5. Display both parallel elements on the same line in the following format: “3.162278 is the square root of 10.0” Part 3: String Array 1. Create a class that declares a String array of items of your choice. 2. Use an Array Initializer to store names of items for your array. 3. After the Array is initialized, change one of the Array values. 4. Print the array items on the same line separated by a comma and a space. 5. Display the number of items on the list using an Array property.
Jan 26, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here