Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. import java.util.Stack;
  2. //Transaction list is an Integer because it will just be storing the amount entering and exiting the account,
  3. //if we wanted to store more info we would need another object to store where the money is coming/going
  4.  
  5. public class Account {
  6. private int overdraftPreference;
  7. private Stack<Integer> transactionList;
  8. private String type;
  9.  
  10. public Account(int overdraftPreference, String type) {
  11. this.overdraftPreference = overdraftPreference;
  12. this.type = type;
  13. }
  14.  
  15. public String getType() {
  16. return type;
  17. }
  18.  
  19. public void setType(String type) {
  20. this.type = type;
  21. }
  22.  
  23. public int getOverdraftPreference() {
  24. return overdraftPreference;
  25. }
  26.  
  27. public void setOverdraftPreference(int overdraftPreference) {
  28. this.overdraftPreference = overdraftPreference;
  29. }
  30.  
  31. public Stack<Integer> getTransactionList() {
  32. return transactionList;
  33. }
  34.  
  35. public void setTransactionList(Stack<Integer> transactionList) {
  36. this.transactionList = transactionList;
  37. }
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement