Scott Grissom
School of Computing & Info Systems
Grand Valley State University
picture

Lab: Ch 4 Notebook

Preparation

Do the following before arriving at lab:

  • Read chapter 4.1 - 4.8
  • Bring your textbook to lab

Objectives

After completing this lab, you should be able to:

  • access data from an ArrayList
  • use repetition statements to solve problems

Exercises

Perform each of the following exercises.

  1. Open the Notebook1 project in Chapter 4
  2. Add your name as author
  3. Exercise 4.1
  4. Exercise 4.9 (write RemoveNote)
  5. Exercise 4.12 (write ListNotes)
  6. Exercise 4.13
  7. write a method called booean isValidIndex(int index) that is passed an integer representing a potential index into the ArrayList. Return true if the index is valid, otherwise return false.
  8. modify showNote and removeNote to print an error message if the index is not valid. Invoke the isValidIndex method written in the previous exercise to test the index.
  9. Exercise 4.20 (write Search)
  10. Exercise 4.21 (modify List Notes)
  11. Exercise 4.22
  12. Print the source code (with your name).

Grading Criteria

This lab is worth a possible 10 points.

  • methods (8 pts)
  • coding style (2 pts)