Last active
March 6, 2024 13:14
-
-
Save rucko24/b4e3deed89f91ebce189d8d4cd912272 to your computer and use it in GitHub Desktop.
BankAccount
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example.bankaccount; | |
/** | |
* Bank Account | |
*/ | |
public class BankAccount { | |
private double balance; | |
public void deposit(double amount) { | |
balance += amount; | |
} | |
public void withdraw(double amount) { | |
balance -= amount; | |
} | |
public double getBalance() { | |
return balance; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment