Personal tools
You are here: Home Classes Fall 2004 - Spring 2005 CS 150 4.4.05 March 25
Document Actions

March 25

by admin last modified 2005-05-11 13:33

Examples from April 4

More work with Collection classes. Here are four versions of a program that reads in a list of names and phone numbers and allows you to search the list for a given name:

PersonWithPhone.java and PeopleList1.java and SimpleInput.java: This reads in the list of names and phone numbers, then prints it out. No searching.

PersonWithPhone.java and PeopleList.java and SimpleInput.java: This is the full program.

PersonWithPhone.java and PeopleList2.java and SimpleInput.java: This is the same program, only with iterators rather than indexing for walking through the lists.

PersonWithPhone.java and PeopleList3.java and SimpleInput.java: This is the same program, only with LinkedList rather than ArrayList implementation of the list.

 

 

 

 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: