import java.io.ObjectOutputStream;
import java.io.FileOutputStream;
public class PVWriter{
public static void main(String [] args)
throws java.io.IOException {
ObjectOutputStream out =
new ObjectOutputStream(
new FileOutputStream("people.dat"));
PeopleVec PV=new PeopleVec();
String [] names={"Bob", "Doug", "Mohona",
"Takeshi", "Wenjie"};
for (int i=0; i<names.length; i++){
PV.add(names[i],i);
}
out.writeObject(PV);
out.flush();
}
}