Implement a Java method that takes as arguments an array and another value. The method returns the position (index) of the value in the array. For example, given an array {21, 3, 67, -8} and value 3, the routine should return 1 (since 3 occurs at position 1 in the array (what is the first index in a Java array?)).
If the value is not found in the array, return -1. Your method should accept generic parameters so that arrays and values of various types can be passed in. Any single method call will pass in a value and an array of the same type. Write your method to be as flexible as possible in other ways as well; e.g. do not hard-code the length of the array that is passed in. This method does not output anything to the screen. From a separate class, call your method from main and demonstrate it working with arrays of at least three different types and sizes. Be sure to demonstrate at least one case where the value is not found in the array.
The results of the method calls should be printed to the screen from here. Submission Requirements Please submit here: Source files. This is one or more .java files that contain your original source code. Java source files have .java extensions, and they are human readable in a text editor! Screenshots. One or more screenshots demonstrating your program running on your development workstation. Be sure to capture all program output, and be sure that your output is produced by your program!
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of