All pastes #237228 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-11-04 12:42 UTC
rendered paste body
/**
 * Classe metier "Client" by shark - copyleft 2006 (tm) - all right reserved 
 **/

package com.monprojet.metier;

/**
 * Cette classe contient toutes les données d'un client 
 */
public class Client {

        // l'identifiant du client (default: 0)
        private int idClient=0;

        // le nom du client (default: null)
        private String nomClient=null;

        // le constructeur transforme cette classe en superclasse
        public Client() {
                super();
        }

        public Client(int id, String nom) {
                this.idClient=id;
                this.nomClient=nom;
        }

        /**
         * cette methode affecte le numero du client 
         **/
        public void setClient(int id) { this.idClient=id; }
        public void setClient(String nom) { this.nomClient=nom; }
        
        /**
         * cette methode retourne le numero du client (default: 0 = aucun client)
         */
        public int getIdClient() { return this.idClient; }
        public String getNomClient() { return this.nomClient; }

}