Application - Integer.parseInt(tokens[2]))); } else { Name...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
package lab9; p public class Application { public static void main(String[] args) { p List aList = new List(100); FileRead fr = new FileRead("polyComboLockData.txt"); String line = fr.readLine(); String [] tokens = new String[10]; S while(line!=null) { tokens = line.split(","); if(tokens[2]==null) { aList.insert(new ComboLock(Integer.parseInt(tokens[0]), tokens[1])); } if(tokens[3]==null) { aList.insert(new DeletedComboLock(Integer.parseInt(tokens[0]), tokens[1],
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Integer.parseInt(tokens[2]))); } else { Name tempName = new Name(tokens[0], tokens[1], tokens[2]); ComboLock tempComboLock = new ComboLock(Integer.parseInt(tokens[3]), tokens[4]); aList.insert(new NameComboLock(tempComboLock, tempName.toString())); } } aList.reset(); for(int i = 0; i<aList.getIndex(); i++) { System.out.println(aList.getNext().toString()); } aList.selectionSort(); aList.display(); a } }...
View Full Document

This note was uploaded on 09/10/2009 for the course CS 102 taught by Professor Kanipiakins during the Spring '09 term at University of Maryland Baltimore.

Ask a homework question - tutors are online