stoyanoff

Account

Jun 24th, 2020
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.text.DecimalFormat;
  4.  
  5. public class Account {
  6.  
  7.  
  8.     String accountHolderName = "Svetlyo Stoyanov";
  9.  
  10.     double accountBalance = 0;
  11.  
  12.  
  13.     public void AccountHolderName(String accountHolderName) {
  14.         this.accountHolderName = accountHolderName;
  15.     }
  16.  
  17.  
  18.     public void setAccountBalance(double newDeposit) {
  19.         this.accountBalance = accountBalance + newDeposit;
  20.  
  21.  
  22.     }
  23.  
  24.     public void withdrawBalance(double withdrawAmount) {
  25.         this.accountBalance = accountBalance - withdrawAmount;
  26.     }
  27. }
Add Comment
Please, Sign In to add comment