Grosse MàJ
This commit is contained in:
6
workspace/Personne_Femme/.classpath
Normal file
6
workspace/Personne_Femme/.classpath
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path=""/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path=""/>
|
||||
</classpath>
|
17
workspace/Personne_Femme/.project
Normal file
17
workspace/Personne_Femme/.project
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Personne_Femme</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
BIN
workspace/Personne_Femme/personneFemme/Femme.class
Normal file
BIN
workspace/Personne_Femme/personneFemme/Femme.class
Normal file
Binary file not shown.
28
workspace/Personne_Femme/personneFemme/Femme.java
Normal file
28
workspace/Personne_Femme/personneFemme/Femme.java
Normal file
@ -0,0 +1,28 @@
|
||||
package personneFemme;
|
||||
|
||||
import personneFemme.Personne;
|
||||
|
||||
/**
|
||||
* G<>re des femmes qui h<>ritent de la classe Personne
|
||||
* @author blankoworld
|
||||
*
|
||||
*/
|
||||
|
||||
public class Femme extends Personne{
|
||||
|
||||
private String njf;
|
||||
/**
|
||||
* @param args
|
||||
*/
|
||||
public Femme(String nomFemme, int anneeNaissFemme, String nomJeuneFille)
|
||||
{
|
||||
super(nomFemme, anneeNaissFemme);
|
||||
njf = nomJeuneFille;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
BIN
workspace/Personne_Femme/personneFemme/Personne.class
Normal file
BIN
workspace/Personne_Femme/personneFemme/Personne.class
Normal file
Binary file not shown.
49
workspace/Personne_Femme/personneFemme/Personne.java
Normal file
49
workspace/Personne_Femme/personneFemme/Personne.java
Normal file
@ -0,0 +1,49 @@
|
||||
package personneFemme;
|
||||
|
||||
/**
|
||||
* Permet la cr<63>ation de personnes
|
||||
* @author blankoworld
|
||||
*
|
||||
*/
|
||||
|
||||
public class Personne {
|
||||
|
||||
private String nom;
|
||||
private int anneeNaissance;
|
||||
|
||||
/**
|
||||
* @param args
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructeur de la classe Personne
|
||||
*/
|
||||
public Personne (String nomPers, int anneeNaissPers)
|
||||
{
|
||||
nom = nomPers;
|
||||
anneeNaissance = anneeNaissPers;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
String resultat;
|
||||
|
||||
resultat = "Nom : " + this.nom;
|
||||
resultat += "\nAnn<EFBFBD>e de naissance : " + this.anneeNaissance;
|
||||
|
||||
return resultat;
|
||||
}
|
||||
/**
|
||||
* M<>thode principale de la classe Personne
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
Personne pers1 = new Personne("DUPONT",1962);
|
||||
Personne pers2 = new Personne("DURAND",1985);
|
||||
|
||||
System.out.println(pers1.toString());
|
||||
System.out.println(pers2.toString());
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user