AnoTest

Compte_Bancaire_Exercice(Java)

Jan 30th, 2021 (edited)
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.04 KB | None | 0 0
  1. //CompteBancaire resolved
  2. public class Compte {
  3.  
  4. double  numero;
  5.     double solde;
  6.     String IdentiteProprietaire ="";
  7.  
  8.      RepondeurTest(double numero, double solde, String  IdentiteProprietaire){
  9.  
  10.         this.numero = numero;
  11.         this.solde = solde;
  12.         this.IdentiteProprietaire = IdentiteProprietaire;
  13.  
  14.  
  15.     }
  16.  
  17.     public void Affiche(){
  18.  
  19.         System.out.println("Numero = " + numero);
  20.         System.out.println("Solde = " + solde);
  21.         System.out.println("Identiter du Proprietaire = " + IdentiteProprietaire);
  22.     }
  23.  
  24.     public double debitCompte(double solde){
  25.         this.solde = this.solde - solde;
  26.         return  solde;
  27.  
  28.     }
  29.  
  30.     public double CreditCompte (double solde){
  31.         this.solde = this.solde + solde;
  32.         return  solde;
  33.  
  34.     }
  35.  
  36.     public static void main (String args[]) {
  37.  
  38.         RepondeurTest comp1= new RepondeurTest(25,879.65,"Paul");
  39.  
  40.         comp1.Affiche();
  41.         comp1.debitCompte(20)
  42.         comp1.CreditCompte(200);
  43.         comp1.Affiche();
  44.  
  45.     }
  46.  
  47. }
  48.  
  49.  
Add Comment
Please, Sign In to add comment