1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| import java.util.Vector;
import sadok.Etudiant;
import sadok.University;
public abstract class FSTvector implements University {
private Vector<Etudiant> Etudiant = new Vector<Etudiant>();
public void addEtudiant(Etudiant e) {
Etudiant.add(e); // The method add(int, Etudiant) in the type Vector<Etudiant> is not applicable for the arguments (String, String)
}
public void addEtudiant(String nom,String prenom) {
Etudiant.add(nom, prenom);
}
public boolean contains(Etudiant e) {
return false; // Syntax error on token "e", delete this token
Etudiant.contains (Etudiant e);
}
public void removeEtudiant(Etudiant e) {
{
Etudiant.remove (e);
}
}
public void removeEtudiant(String nom,String prenom) {
Etudiant.remove(nom);
Etudiant.remove(prenom);
}
public void displayEtudiants() {
Etudiant.display( Etudiant );//The method display(Vector<Etudiant>) is undefined for the type Vector<Etudiant>
}
public Etudiant displayEtudiant(String nom) {
return null;
}
} |
Partager