mmayoub

Bank, Account types (enum)

Aug 10th, 2017
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. package BankPkg;
  2.  
  3. public enum AccountType {
  4. regular(1, 0.05, -5000, 18, 120), teenage(2, 0.0, 0, 16, 18), business(3,
  5. 0.02, -20000, 21, 120), student(4, 0.01, 0, 18, 120), soldier(5,
  6. 0.0, -8000, 18, 21);
  7.  
  8. private int prefixIdDigit;
  9. private double defaultFee;
  10. private int defaultCredit;
  11. private int minAge;
  12. private int maxAge;
  13.  
  14. private AccountType(int prefixIdDigit, double defaultFee,
  15. int defaultCredit, int minAge, int maxAge) {
  16. this.prefixIdDigit = prefixIdDigit;
  17. this.defaultFee = defaultFee;
  18. this.defaultCredit = defaultCredit;
  19. this.minAge = minAge;
  20. this.maxAge = maxAge;
  21. }
  22.  
  23. public int getPrefixIdDigit() {
  24. return this.prefixIdDigit;
  25. }
  26.  
  27. protected void setPrefixIdDigit(int prefixIdDigit) {
  28. this.prefixIdDigit = prefixIdDigit;
  29. }
  30.  
  31. public double getDefaultFee() {
  32. return this.defaultFee;
  33. }
  34.  
  35. protected void setDefaultFee(int defaultFee) {
  36. this.defaultFee = defaultFee;
  37. }
  38.  
  39. public int getDefaultCredit() {
  40. return this.defaultCredit;
  41. }
  42.  
  43. protected void setDefaultCredit(int defaultCredit) {
  44. this.defaultCredit = defaultCredit;
  45. }
  46.  
  47. public int getMinAge() {
  48. return this.minAge;
  49. }
  50.  
  51. protected void setMinAge(int minAge) {
  52. this.minAge = minAge;
  53. }
  54.  
  55. public int getMaxAge() {
  56. return this.maxAge;
  57. }
  58.  
  59. protected void setMaxAge(int maxAge) {
  60. this.maxAge = maxAge;
  61. }
  62. };
Add Comment
Please, Sign In to add comment