import java.util.*; public class productList extends JawtList implements visList { public productList() { super(10); //sets up JawtList } //------------------------------------- private void splitAdd(String s) { //take each string apart and keep only //the product names, discarding the quntities int index = s.indexOf("--"); //separate qty from name if(index > 0) super.add(s.substring(0, index)); else super.add(s); } //------------------------------------- public void addLine(String s) { splitAdd(s); super.validate(); } //------------------------------------- public void removeLine(int index) { String s = super.getElementAt(index); super.remove(s); } }