Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

My Courses & Academics - oakton.edu PROJECT DESCRIPTION Type, compile and run a computer program that uses both arrays and methods with Searching and

imageimageimageimageimageimage

My Courses & Academics - oakton.edu PROJECT DESCRIPTION Type, compile and run a computer program that uses both arrays and methods with Searching and Sorting Techniques. Arrays, or subscripted variables, allow for variables, with common data types, to be grouped under one name. Methods assist in developing modular programs segments. Follow the provided instructions and use arrays and methods to search for data and sort the data. Basically, your program should perform these minimally required tasks: declare and populate an array of strings declare and populate a parallel array of integers perform searches on both arrays perform parallel processing using both arrays D2L CSC_241_LAB_04_2022 - CSC-241-0C1 - Java Data Structures display the arrays after some elements in the arrays have been updated accomplish sorts on both arrays These tasks will be outlined below in the steps for completion of this project. d2l.oakton.edu After you complete your program code, compile and run your program, observe the output and then modify the program. Some skeletal program code is shown in Figure 1, which follows. View as Page + Homework Help - Q&A from Online Tutors - Course Hero 00 My Courses & Academics - oakton.edu PROJECT Arrays and Methods with Java - Searching and Sorting Steps to Complete This Project An Insertion Sort, also known as a Bully Sort, is such that we take the elements from the list one at a time and insert them in their correct position into a new sorted list. STEP 1 Open an Integrated Development Environment (IDE) STEP 2 Write the Program Code Open Eclipse, Net Beans, VSCode, MS Visual Studio or similar programming text editor / compiler. Write the program code that will satisfy the requirements of this project. In a top-down fashion, construct the code statements with these specifications. Within your file, declare a Scanner class object that will be used for user input. import java.util.S D2L CSC_241_LAB_04_2022 - CSC-241-0C1 - Java Data Structures static Scanner sc = new Scanner(System.in); Declare an array of strings. Use a one-dimensional array with ten elements. String[] myClientsArray = new String[10]; Populate the array of strings using these client names. Client Names d2l.oakton.edu View as Page + Homework Help - Q&A from Online Tutors - Course Hero 00 My Courses & Academics - oakton.edu String[] myClientsArray = new String[10]; Populate the array of strings using these client names. Client Names Butler Samuels Bond Davis Joe Chang Baker Zheng Use this code construction for hard - coding the values of the string array. myClientsArray[0] = "Butler"; myClientsArray[1] = "Samuels"; myClientsArray[2] = "Bond"; Now declare an array of integers. Use a one-dimensional array with at most ten elements. int[] myClientNumbers = new int[10]; D2L CSC_241_LAB_04_2022 - CSC-241-0C1 - Java Data Structures Populate the array of integers using these client numbers. This integer array will be a parallel array to the string array, which holds the client names. PROJECT Arrays and Methods with Java - Searching and Sorting View as Page d2l.oakton.edu Homework Help - Q&A from Online Tutors - Course Hero 00 My Courses & Academics - oakton.edu public void linSearchString(String strArray[], String search) { int i = = 0; int flag = 0; for(i=0; i Bond item found at position 3 Enter a Client Number -> 188 item found at position 3 D2L CSC_241_LAB_04_2022 - CSC-241-0C1 - Java Data Structures results: the positions MATCH d2l.oakton.edu View as Page Homework Help - Q&A from Online Tutors - Course Hero STEP 5 Verify Your Output When you enter the above information, the Console window should show your program output. Verify that the output is accurate and that the required output information is displayed. If necessary, use separate program runs to compare various input and output values. + STEP 6 Modify Your Program With both the original arrays still hardcoded as being unsorted, use parallel array processing logic and programming techniques to search for a client name and have the associated client number also displayed together as a paired entity in the search results. 00 My Courses & Academics - oakton.edu STEP 7 Re - Compile and Run the Program Once you have successfully compiled your modified program, ensure that your completed program runs successfully. D2L CSC_241_LAB_04_2022 - CSC-241-0C1 - Java Data Structures STEP 8 Verify Your Output When you enter the requested information, the Console window should show your program output. Verify that the output is numerically accurate and that the required output information is displayed. Again, use separate program runs to compare the output when different inputs are used. d2l.oakton.edu Of course, when you run your modified program, you will most likely be able to match Client Name with a Client Number but it will most unlikely that you will not be able to match the same name with the same number when it comes to your sorted arrays. This is what your program will illustrate. STEP 9 Submit Your Project Once you have determined that your modified program is satisfying this project's requirements, complete the submission process as follows: Open MS Word and type a heading for a new document that includes your full name, course number, lab number and date. Within the document paste a snapshot of your program code. Label your snapshot with a reasonable description. After the snapshot, paste the output that appears in your Console screen. Note - you can use the Windows Snipping Tool, which is part of the Windows Accessories Group, to easily capture your Console window. PROJECT Arrays and Methods with Java - Searching and Sorting View as Page ? Homework Help - Q&A from Online Tutors - Course Hero 00

Step by Step Solution

3.40 Rating (147 Votes )

There are 3 Steps involved in it

Step: 1

import javautilScanner public class ClientSearch static Scanner sc new ScannerSystemin public static ... 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_2

Step: 3

blur-text-image_3

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

Accounting Information Systems

Authors: George H. Bodnar, William S. Hopwood

11th Edition

0132871939, 978-0132871938

More Books

Students also viewed these Programming questions