import java.util.*;

/**   Classe servant à gérer un annuaire de restaurants.
      Les méthodes static servent à accéder à la base.  */

public class Restaurant {

   static final int parNom = 1;
   static final int parAdresse = 2;
   static final int parNumeroTel = 3;

   static Vector liste = new Vector ();

   String nom;
   String adresse;
   String numeroTel;

   Restaurant ( String nom, String adresse, String numeroTel ) 

   void afficher () 
   /** affiche le contenue de l'instance sur 3 lignes  */

   public static Restaurant chercher ( String s, int type ) 
   /** recherche d'un restaurant en fonction du type */

   public static void ajouter ( Restaurant r ) 

   public static void afficherTout () 
   /** affiche la liste de tous les restaurants, un restaurant par ligne  */

   public static void main ( String [] arg ) {
   /** pour l'instant ne fait que tester la classe */
      ajouter ( new Restaurant ( "La Petite Savoie", "Bordeaux", "05..") );
      ajouter ( new Restaurant ( "La Crèpe d'or", "Bordeaux", "05..") );
      ajouter ( new Restaurant ( "Krishna", "Bordeaux", "05..") );
      ajouter ( new Restaurant ( "Le Canneton", "Bordeaux", "05..") );
      afficherTout ();
      chercher ( "Krishna", parNom ).afficher (); 
   }
}