.. This file is part of the OpenDSA eTextbook project. See .. http://opendsa.org for more details. .. Copyright (c) 2012-2020 by the OpenDSA Project Contributors, and .. distributed under an MIT open source license. .. avmetadata:: :author: Molly Java Arrays =========== Objectives ---------- * Trace code that uses arrays * Write code to create and process arrays including finding a sum, average, max, and min values * Trace and write code to perform a linear search on an array * Trace and write code to insert or remove an item anywhere in an array Interactive: Java Array Basics ------------------------------ .. admonition:: Follow Along, Practice and Explore Download to run and explore the java file (see below) from the video on your own in eclipse. You may download the standalone \*.java file for this example. To run the standalone \*.java file you will need to 1) create a new Eclipse project, then 2) create a package within the project called “example” (the package named at the top of the class MUST match the package the file is placed in within the Eclipse project), and finally 3) download and import the standalone \*.java file(s) to the created package. .. raw:: html ArrayBasics.java .. raw:: html
Checkpoint 1 ------------ .. avembed:: Exercises/SWDesignAndDataStructs/ArrayCheckpoint1Summ.html ka :long_name: Checkpoint 1 Programming Practice: Java Arrays 1 ------------------------------------ .. extrtoolembed:: 'Programming Practice: Java Arrays 1' :workout_id: 2477 Interactive: Java Array Search ------------------------------ .. admonition:: Follow Along, Practice and Explore Download to run and explore the java file (see below) from the video on your own in eclipse. You may download the standalone \*.java file for this example. To run the standalone \*.java file you will need to 1) create a new Eclipse project, then 2) create a package within the project called “example” (the package named at the top of the class MUST match the package the file is placed in within the Eclipse project), and finally 3) download and import the standalone \*.java file(s) to the created package. .. raw:: html ArrayLinearSearch.java .. raw:: html
Checkpoint 2 ------------ .. avembed:: Exercises/SWDesignAndDataStructs/ArrayCheckpoint2Summ.html ka :long_name: Checkpoint 2 Interactive: Java Array Removing, Inserting, & Tips --------------------------------------------------- .. admonition:: Follow Along, Practice and Explore Download to run and explore the java files (see below) from the video on your own in eclipse. You may download the standalone \*.java file for this example. To run the standalone \*.java file you will need to 1) create a new Eclipse project, then 2) create a package within the project called “example” (the package named at the top of the class MUST match the package the file is placed in within the Eclipse project), and finally 3) download and import the standalone \*.java file(s) to the created package. .. raw:: html ArrayRemove.java .. raw:: html ArrayInsert.java .. raw:: html
Checkpoint 3 ------------ .. avembed:: Exercises/SWDesignAndDataStructs/ArrayCheckpoint3Summ.html ka :long_name: Checkpoint 3 Programming Practice: Java Arrays 2 ------------------------------------ .. extrtoolembed:: 'Programming Practice: Java Arrays 2' :workout_id: 2478