lab1_001 - 15-121 FALL 2009 [CORTINA]LAB 1Download and open...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 15-121 FALL 2009 [CORTINA]LAB 1Download and open a copy of the PhoneDirectory project discussed in lecture: PhoneDirectory.zipIn this program, the PhoneDirectoryclass contains an array to hold the directory entries and an integer to indicate how many cells of the array contain directory entries. The directory entries are stored sequentially in the array starting from position 0 with no empty cells. So if there are 6 entries in the array, they are stored in position 0 through 5. Read through this class to understand how it works.To run the program, execute the PDApplication class. (In Eclipse, click on that class in the Package Explorer and then choose Run > Run As... > Java Application.) EXERCISES1. Add a new private helper method named getDirectoryfor the PhoneDirectoryclass that returns a single string that contains ALL of the names and phone numbers in the phone directory in the order that they are stored in the array. The string, if printed, should look like: NAME1 / NUMBER1NAME2 / NUMBER2...
View Full Document

This note was uploaded on 12/19/2009 for the course CS 121 taught by Professor Reid-miller during the Spring '09 term at Carnegie Mellon.

Page1 / 2

lab1_001 - 15-121 FALL 2009 [CORTINA]LAB 1Download and open...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online