Computer Science 210
Data Structures

Fall 2017, Siena College

Lecture 09: The ArrayList and Vector ADTs
Date: Monday, September 25, 2017


Lecture 09 Assignment

Due at the start of class, Friday, September 29.

Please submit answers to these questions in Blackboard under "Lecture 09 Assignment" by the start of class. We will discuss these questions at the start of class, so no late submissions can be accepted.

  1. Write a method that takes an ArrayList of Double values as its parameter and returns the largest value found in the ArrayList. (5 points)
  2. Write a method that takes an int and an ArrayList of Integer as parameters and returns another ArrayList of Integer that includes only those values from the original ArrayList that are greater than the int parameter's value. (5 points)
  3. As part of your process of becoming a stronger programmer is to know the proper terminology for general programming concepts and constructs and for the specific language in which you are working. There will be a question related to this on our first exam, in the same format as you see here.

    Your task is to take a printed copy of the Matrix2D example, and identify one example of each of the following. Please identify only one of each, and identify it by circling your entire response (so if it's asking for a method definition, you'd circle everything from "public" to its close "}") and label the circle with the item number from the list below. Note that on the exam, there will not be any comments that give away answers.

    (i) a method name, (ii) an object construction, (iii) an assignment statement, (iv) an array index, (v) an accessor method definition, (vi) a formal parameter, (vii) an instance variable declaration, (viii) a method call, (ix) an actual parameter, (x) a constructor definition, (xi) a method header (also known as a method signature), (xii) a mutator method, (xiii) a class comment, (xiv) a method's return type definition, (xv) a class name, (xvi) a local variable declaration.

    This is worth 16 points, one for each you properly identify. You may submit this as a picture in Blackboard, or hand in a paper copy (with your name on it, of course) at the start of class on the due date.