コード例 #1
0
ファイル: compte.cs プロジェクト: OufakirTarek1/atelier1
 public compte(client titulaire, mad solde)
 {
     cpt++;
     this.numcomp   = cpt;
     this.solde     = solde;
     this.titulaire = titulaire;
 }
コード例 #2
0
ファイル: compte.cs プロジェクト: OufakirTarek1/atelier1
 public bool Debiter(mad somme)
 {
     if (plafond >= somme)
     {
         solde -= somme;
         Console.Out.WriteLine("operation est realisee");
         return(true);
     }
     else
     {
         Console.Out.WriteLine("vous avez depasse le plafond");
     }
     return(false);
 }
コード例 #3
0
ファイル: compte.cs プロジェクト: OufakirTarek1/atelier1
 public bool verser(compte c, mad somme)
 {
     if (solde >= somme)
     {
         solde   -= somme;
         c.solde += somme;
         Console.Out.WriteLine("operation est realisee");
         return(true);
     }
     else
     {
         Console.Out.WriteLine("le solde est insuffisant");
     }
     return(false);
 }
コード例 #4
0
        public static mad operator-(mad c1, mad c2)
        {
            mad c4 = new mad(c1.valeur - c2.valeur);

            return(c4);
        }
コード例 #5
0
        public static mad operator+(mad c1, mad c2)
        {
            mad c3 = new mad(c1.valeur + c2.valeur);

            return(c3);
        }