From 883e65779a678d0c205421e7d2c8c265880ae53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Thu, 5 May 2022 16:33:26 +0200 Subject: [PATCH] finish comments on BankAccount --- bin/bank/BankAccount.class | Bin 1479 -> 1479 bytes src/bank/BankAccount.java | 14 ++++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/bank/BankAccount.class b/bin/bank/BankAccount.class index afd2757f68823a43ca213702d2e1d9a37a38ea85..86371dec3c09c09da6db93a0ddcddec5012b1347 100644 GIT binary patch delta 75 zcmX@keVlv4S!PD|$>*4D7zHMCvjhlAGO#g7G4L`-Gw?CUGDtAUP0nFS<5g$iWYAy` eV9)}}X-~e-lEiAtAjV)e*^M=Y(Qfi;Rv7>|91bo3 delta 75 zcmX@keVlv4S!PDI$>*4D82Kl2vjhlAFt9O5GVn4;G4L_SFi0@SPR?OT<5gqeWKd@i eV9*4LYfZk-lEiAvAjV)a*^M=Y(Pr{$Rv7>`2M!$o diff --git a/src/bank/BankAccount.java b/src/bank/BankAccount.java index 0b8d81f..33df7aa 100644 --- a/src/bank/BankAccount.java +++ b/src/bank/BankAccount.java @@ -2,6 +2,7 @@ package bank; /** * Create a bank account with a balance and a owner + * General abstract class for used in specific other bank account */ public abstract class BankAccount { protected double balance; @@ -9,7 +10,7 @@ public abstract class BankAccount { /** * Get balance of the account - * @return the balance of the account + * @return The balance of the account */ public double getBalance() { return balance; @@ -18,7 +19,7 @@ public abstract class BankAccount { /** * Deposit an amount on your account * Check the amount for accept only positive amount. - * @param amount + * @param amount The amount you want to deposit (have to be positive). */ public void deposit(double amount){ if(amount<0){ @@ -31,7 +32,7 @@ public abstract class BankAccount { /** * Withdraw an amount on your account * Check the amount for be sure you have this money - * @param amount The amount you want to withdraw + * @param amount The amount you want to withdraw (have to be less or equal to the money you have) * @return true : if the withdraw has been done */ public boolean withdraw(double amount){ @@ -43,9 +44,10 @@ public abstract class BankAccount { } /** - * Explain the problem, if something is wrong - * @param text - * @return the explanation of the problem + * Explain the problem, if something is wrong. And print it on terminal. + * + * @param text The description of your specific error + * @return return always false. Can be used for check if have a problem */ protected boolean error(String text){ System.out.println("Problem : " + text);