Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Stack;
- //Transaction list is an Integer because it will just be storing the amount entering and exiting the account,
- //if we wanted to store more info we would need another object to store where the money is coming/going
- public class Account {
- private int overdraftPreference;
- private Stack<Integer> transactionList;
- private String type;
- public Account(int overdraftPreference, String type) {
- this.overdraftPreference = overdraftPreference;
- this.type = type;
- }
- public String getType() {
- return type;
- }
- public void setType(String type) {
- this.type = type;
- }
- public int getOverdraftPreference() {
- return overdraftPreference;
- }
- public void setOverdraftPreference(int overdraftPreference) {
- this.overdraftPreference = overdraftPreference;
- }
- public Stack<Integer> getTransactionList() {
- return transactionList;
- }
- public void setTransactionList(Stack<Integer> transactionList) {
- this.transactionList = transactionList;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement