Upload files to "DEV.2.1/cours-java"

This commit is contained in:
2025-03-02 20:33:18 +01:00
parent a4fddc3b9a
commit 84700087b3
5 changed files with 44 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,44 @@
public class Document {
protected String titre;
protected String ISBN;
public Document(String t, String i) {
this.titre = t;
this.ISBN = i;
}
@Override
public String toString () {
return this.titre + "(ISBN"+this.ISBN+")";
}
}
public class Periodique extends Document{
private int numero;
public Periodique(String t, String i, int n) {
super(t, i);
this.numero = n;
}
@Override
public String toString () {
return this.titre + "(numero"+this.numero+"(ISBN"this.ISBN+")";
}
}
public class Ouvrage extends Document{
private String Auteur;
public Ouvrage(String t, String t, String A) {
super(t,i);
this.Auteur=A;
}
@Override
public String toString () {
return super.toString() + " " + this.auteur;
}
}

Binary file not shown.

Binary file not shown.