public class vehicle_register
{
String name;
int number_of_vehicles;
vehicle list[];

public vehicle_register(String kname,vehicle klist[])
{name=kname;
 number_of_vehicles=klist.length;
 list=new vehicle[number_of_vehicles];
 for(int vehicle_number=0;vehicle_number<number_of_vehicles;vehicle_number++)
 {list[vehicle_number]=klist[vehicle_number];}
}

 public String toString()
 {	 String s="Vehicle register name : "+name+"\n";
     s+="Total number of vehicles : "+number_of_vehicles+"\n\n";
     for(int vehicle_number=0;vehicle_number<number_of_vehicles;vehicle_number++)
     {s+=list[vehicle_number].toString()+"\n";}	 
     return s;
 }

}