Bonjour j'ai un petit problème.
J'ai 3 classe.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 public class Personne { private String nom; private String prenom; private Adresse adresse; private TelephoneFaxMail telephoneFaxMail; public Personne() { nom = ""; prenom = ""; adresse = new Adresse(); telephoneFaxMail = new TelephoneFaxMail(); } public Personne(String n, String p) { nom = n; prenom = p; adresse = new Adresse(); telephoneFaxMail = new TelephoneFaxMail(); } public void setNom(String n) { nom = n; } public void setPrenom(String p) { prenom = p; } public String getNom() { return nom; } public String getPrenom() { return prenom; } }
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 public class Adresse { private String adresse; private String ville; private int codePostal; public Adresse() { adresse = ""; ville = ""; codePostal = 0; } public Adresse(String a, String v, int cP) { adresse = a; ville = v; codePostal = cP; } public void setAdresse(String a) { adresse = a; } public void setVille(String v) { ville = v; } public void setCodePostal(int cp) { codePostal = cp; } public String getAdresse() { return adresse; } public String getVille() { return ville; } public int getCodePostal() { return codePostal; } }Voilà le problème je voudrais pouvoir , a n'importe quel moment du programme et non a la construction , pouvoir modifier les informations
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
47
48
49
50
51
52
53
54
55
56
57 public class TelephoneFaxMail { private String telephoneFixe; private String telephonePortable; private String Fax; private String e_mail; public TelephoneFaxMail() { telephoneFixe = ""; telephonePortable = ""; Fax = ""; e_mail = ""; } public TelephoneFaxMail(String tF, String tP, String f, String eM) { telephoneFixe = tF; telephonePortable = tP; Fax = f; e_mail = eM; } public void setTelephoneFixe(String tF) { telephoneFixe = tF; } public void setTelephonePortable(String tP) { telephonePortable = tP; } public void setFax(String f) { Fax = f; } public void setEMail(String eM) { e_mail = eM; } public String getTelephoneFixe() { return telephoneFixe; } public String getTelephonePortable() { return telephonePortable; } public String getFax() { return Fax; } public String getEMail() { return e_mail; } }
Adresse
ou
TelephoneFaxMail
d'une personne.
Mais je ne sais pas comment faire.
Pouvez vous m'aider.
Partager