stoyanoff

аccinfoclass

Jun 23rd, 2020
649
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  1. package com.company;
  2.  
  3. public class AccountInfo {
  4.  
  5.     private String accountHolderName;
  6.     private double accountBalance;
  7.  
  8.     public String AccountInfo(String accountHolderName) {
  9.         this.accountHolderName = accountHolderName;
  10.     }
  11.     public String getName() {
  12.         return this.accountHolderName;
  13.     }
  14.  
  15.     public void setName(String accountHolderName) {
  16.         this.accountHolderName = accountHolderName;
  17.     }
  18.  
  19.     public AccountInfo(int accountBalance) {
  20.         this.accountBalance = accountBalance;
  21.     }
  22.  
  23.     public double getAccountBalance() {
  24.         return this.accountBalance;
  25.  
  26.     }
  27.  
  28.     public void setAccountBalance(double accountBalance) {
  29.         this.accountBalance = accountBalance;
  30.     }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment