-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserInfos.java
More file actions
34 lines (28 loc) · 1.07 KB
/
UserInfos.java
File metadata and controls
34 lines (28 loc) · 1.07 KB
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
package formulaireProject;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class UserInfos implements Serializable{
private String f_name = "", l_name ="", sexe = "",phone="", email="", nation="", adress = "";
private List<String> hobbies = new ArrayList<String>();
private String age = "";
public UserInfos() {};
public UserInfos(String fname, String lname, String age, String sexe, String adress, String phone, String email, String nation, List hobbies) {
this.f_name = fname;
this.l_name = lname;
this.age = age;
this.sexe = sexe;
this.adress = adress;
this.phone = phone;
this.email = email;
this.nation = nation;
this.hobbies = hobbies;
}
public String toString() {
String info = "Vos Informations:\n\n";
info += "\tNom: "+this.f_name+"; \t Prenom: "+this.l_name+"; \t Sexe: "+this.sexe+"; \n\n";
info += "\tAge: "+ this.age+"; \tNation: "+this.nation+"; \t Adress: "+this.adress+";\n\n";
info +="\tPhone: "+this.phone+"; \tEmail: "+this.email+";\n\n\tLoisirs: "+this.hobbies.toString();
return info;
}
}