Guest User

Untitled

a guest
Apr 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. class geniusATM {
  2.  
  3. private String name, address;
  4. private int pin, ficoScore;
  5. double checkingBalance, savingBalance, mortgageBalance;
  6.  
  7. public geniusATM() {
  8.  
  9. }
  10.  
  11. geniusATM(String nam, String addr, int pn, int fs, double cB, double sB, double mB) {
  12. name = nam;
  13. address = addr;
  14. ficoScore = fs;
  15. checkingBalance = cB;
  16. savingBalance = sB;
  17. mortgageBalance = mB;
  18. }
  19.  
  20. //setters and getters are here
  21. }
  22.  
  23. class Checkings extends geniusATM {
  24. //stuff here
  25. }
  26.  
  27. class Savings extends geniusATM {
  28. //stuff here
  29. }
  30.  
  31. class billPay extends Checkings {
  32. //stuff here
  33.  
  34. }
  35.  
  36. public class singletonObject {
  37.  
  38. private static singletonObject ob;
  39.  
  40. private singletonObject() {
  41. geniusATM matt = new geniusATM("Matt", "124 Road Drive.", 1234, 3462, 560.00, 500.50, 472.29);
  42.  
  43. }
  44.  
  45. public static singletonObject getObject() {
  46. if (ob == null) {
  47. ob = new singletonObject();
  48. }
  49. return ob;
  50. }
  51.  
  52. public static void main(String[] args) {
  53.  
  54.  
  55. }
Add Comment
Please, Sign In to add comment