import java.util.Vector; public class Company{ private Vector employees; private String name; private String address; public Company(){ this.employees = new Vector(); } public void setName(String name){ this.name = name; } public String getName(){ return this.name; } public void setAddress(String address){ this.address = address; } public String getAddress(){ return this.address; } public void addEmployee(Employee employee){ this.employees.add(employee); } public String toString(){ StringBuffer buffer = new StringBuffer("Company: " + this.name); buffer.append("\nlocated at: " + this.address); buffer.append("\nhas " + this.employees.size() + " employees."); buffer.append("\nEmployees are: "); for(int i=0; i < this.employees.size(); i++){ buffer.append("\n" + this.employees.elementAt(i)); } return buffer.toString(); } // other getter/setter methods omitted as not required for this example }