tp 3 / tp 4

This commit is contained in:
2025-09-22 17:52:24 +02:00
parent e16cd32c4b
commit eae28235bc
14 changed files with 438 additions and 22 deletions

View File

@@ -0,0 +1,57 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.test.beans;
/**
*
* @author steve.maingana
*/
public class Client {
private int id;
private String nom;
private String prenom;
private String mail;
public Client(int id, String nom, String prenom, String mail) {
this.id = id;
this.nom = nom;
this.prenom = prenom;
this.mail = mail;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNom() {
return nom;
}
public void setNom(String nom) {
this.nom = nom;
}
public String getPrenom() {
return prenom;
}
public void setPrenom(String prenom) {
this.prenom = prenom;
}
public String getMail() {
return mail;
}
public void setMail(String mail) {
this.mail = mail;
}
}

View File

@@ -0,0 +1,48 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.test.beans;
/**
*
* @author steve.maingana
*/
public class User {
private String pseudo;
private String motDePasse;
public User(String pseudo, String motDePasse) {
this.pseudo = pseudo;
this.motDePasse = motDePasse;
}
public String getPseudo() {
return this.pseudo;
}
private String getMDP() {
return this.motDePasse;
}
public void setPseudo(String pseudo) {
this.pseudo = pseudo;
}
public void setMDP(String MDP) {
this.motDePasse = MDP;
}
@Override
public boolean equals(Object user) {
boolean resultat = false;
if (user.getClass().equals(this.getClass())) {
User toCompare = (User) user;
if (this.getPseudo().equals(toCompare.getPseudo()) && this.getMDP().equals(toCompare.getMDP())) {
resultat = true;
}
}
return resultat;
};
}