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.
- Open the Notebook1 project in Chapter 4
- Add your name as author
- Exercise 4.1
- Exercise 4.9 (write RemoveNote)
- Exercise 4.12 (write ListNotes)
- Exercise 4.13
- 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.
- 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.
- Exercise 4.20 (write Search)
- Exercise 4.21 (modify List Notes)
- Exercise 4.22
- Print the source code (with your name).
Grading Criteria
This lab is worth a possible 10 points.
- methods (8 pts)
- coding style (2 pts)
|