{"product_id":"new-full-course-guide-ecet-370-week-2-lab-devry-university_id-tkt0hex8bshk6dwoaxx6","title":"(New Full Course Guide) ECET-370-Week-2-Lab Devry University","description":"\u003cp\u003e\u003cstrong\u003eGeneral Instructions\u003c\/strong\u003e\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cp\u003eExercises 1, 2, and 3 use the programs in DocSharinglabeled “User-defined array list.”\u003c\/p\u003e\n\u003c\/li\u003e\n\u003cli\u003e\n\u003cp\u003eExercise 4 uses the programs in DocSharinglabeled “Using java.util.ArrayList.”\u003c\/p\u003e\n\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003chr\u003e\n\u003ch2\u003eExercise 1: Review of array-based lists\u003c\/h2\u003e\n\u003cp\u003eCreate a project using the classes in the DocSharing area labeled “User-defined array list.” Compile it, run it, and review the code that is given carefully. This code tests the ArrayList class provided in the lecture.\u003c\/p\u003e\n\u003chr\u003e\n\u003ch2\u003eExercise 2: A user-defined array list\u003c\/h2\u003e\n\u003cp\u003eModify the class ArrayList given in the lecture by adding to it the functions listed below for Exercise 2. In each case, the appropriate error message should be generated if an invalid condition occurs. For example, an error message should be generated when trying to insert an item in a given location in the list and the location is out of range.\u003c\/p\u003e\n\u003cp\u003ea. \u003cstrong\u003eArrayList(int size):\u003c\/strong\u003e create a constructor that sets the size of the array list to the value passed in size (note that the class variable SIZE cannot be final anymore).\u003cbr\u003eb. \u003cstrong\u003eint length():\u003c\/strong\u003e create this function to determine the number of items in the list (accessor function).\u003cbr\u003ec. \u003cstrong\u003eint getSize():\u003c\/strong\u003e create this function to determine the size of the list (accessor function).\u003cbr\u003ed. \u003cstrong\u003evoid clear():\u003c\/strong\u003e create this function to remove all of the items from the list. After this operation, the length of the list is zero.\u003cbr\u003ee. \u003cstrong\u003evoid replace(int location, int item):\u003c\/strong\u003e create this function to replace the item in the list at the position specified by location. The item should be replaced with item.\u003cbr\u003ef. \u003cstrong\u003evoid insert(int location, int item):\u003c\/strong\u003e create this function to add an item to the list at the position specified by location.\u003cbr\u003eg. \u003cstrong\u003evoid remove(int item):\u003c\/strong\u003e create this function to delete an item from the list. All occurrences of item in the list should be removed.\u003cbr\u003eh. \u003cstrong\u003eint get(int location):\u003c\/strong\u003e create a function that returns the element at location.\u003cbr\u003ei. \u003cstrong\u003epublic ArrayList copy():\u003c\/strong\u003e create a function that makes a deep copy to another ArrayList object.\u003c\/p\u003e\n\u003chr\u003e\n\u003ch2\u003eExercise 3: Using an array-based list\u003c\/h2\u003e\n\u003cp\u003eUsing the class ArrayList completed in the previous exercise, write a program that uses it to store 100 random numbers. Consider that each of these random numbers is an integer in the interval \u003cstrong\u003e[0, 200]\u003c\/strong\u003e. Write the program in such a way that there are no number duplicates.\u003c\/p\u003e\n\u003chr\u003e\n\u003ch2\u003eExercise 4: Review of the library class java.util.ArrayList\u003c\/h2\u003e\n\u003cp\u003eCreate a project using the classes in the DocSharing area labeled “Using java.util.ArrayList.” Compile it, run it, and review the code that is given carefully. This code is the complete program given in our lecture that tests the library class java.util.ArrayList.\u003c\/p\u003e\n\u003chr\u003e\n\u003ch2\u003eExercise 5: Using the library class java.util.ArrayList\u003c\/h2\u003e\n\u003cp\u003eRewrite Exercise 3 (above) using the class java.util.ArrayList to store the 100 random numbers.\u003c\/p\u003e","brand":"Take My Online Class","offers":[{"title":"Default Title","offer_id":53394478563603,"sku":null,"price":11.99,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0966\/3794\/4083\/files\/ECET370lab2Capture3.png?v=1769730169","url":"https:\/\/takemyonlineclass.store\/products\/new-full-course-guide-ecet-370-week-2-lab-devry-university_id-tkt0hex8bshk6dwoaxx6","provider":"Take My Online Class","version":"1.0","type":"link"}