lab5 - Lab 5 for CS101 Objective Arrays This Java lab...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lab 5 for CS101 Objective : Arrays This Java lab project addresses the ability to work with single and multi-dimensional arrays in Java. In this lab project, we consider how we can create arrays, index elements of arrays, set elements of arrays, pass arrays across method calls and return arrays as results of method calls. Code segments involving these operations are described in detail below as a list of methods to be developed. Unless otherwise specified, the numbers in any array of this lab shall be randomly generated. Implement the following four methods: indexOfLargestNumber : This method takes an array of numbers as input and returns the index of the largest number in that array. If the largest number appears multiple times, ties are settled by returning the index of its first appearance. For instance, given [4, 2, 7, 1, 7, 3] as input, the method returns 2 (the index of the first appearance of 7 in the array). The method shall print out the values in the input array for verification. The following is the method prototype for the method:...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

lab5 - Lab 5 for CS101 Objective Arrays This Java lab...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online