Guest User

Untitled

a guest
Jun 17th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. /**
  2.  * Dope gangster bank
  3.  *
  4.  * @author (Peter)
  5.  * @version (1.0)
  6.  */
  7. public class BankAccount
  8. {
  9.  
  10.     public int balance;
  11.     public int deposit;
  12.     public int withdraw;
  13.  
  14.     /**
  15.      * How Much CA$H do you want?
  16.      */
  17.     public BankAccount(int amount)
  18.     {
  19.        
  20.         balance = amount;
  21.        
  22.     }
  23.    
  24.     public int withdraw(int amount)
  25.     {
  26.         balance -=amount;
  27.         return balance;
  28.     }
  29.    
  30.     public int deposit(int amount)
  31.     {
  32.         balance +=amount;
  33.         return balance;
  34.     }
  35.    
  36.    
  37.     public int getBalance()
  38.     {
  39.         return balance;
  40.     }
  41. }
Add Comment
Please, Sign In to add comment