Skip to content

Instantly share code, notes, and snippets.

@rucko24
Last active March 6, 2024 13:14
Show Gist options
  • Save rucko24/b4e3deed89f91ebce189d8d4cd912272 to your computer and use it in GitHub Desktop.
Save rucko24/b4e3deed89f91ebce189d8d4cd912272 to your computer and use it in GitHub Desktop.
BankAccount
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