Advertisement
Guest User

Untitled

a guest
Sep 26th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. public class Client extends Thread{
  2.    
  3.     private int nb;
  4.     private String nom;
  5.     private int montant;
  6.     private Compte compte;
  7.    
  8.     Client(String nom, int nb, int montant, Compte compte) {
  9.         this.nom= nom;
  10.         this.nb = nb;
  11.         this.montant=montant;
  12.         this.compte=compte;
  13.     }
  14.     public void run() {
  15.         System.out.println(nom+" va faire "+ nb +" dépots de "+montant + " €.");
  16.         for (int i = 0; i<nb; i++) {
  17.             compte.deposer(montant);
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement