Advertisement
Guest User

Java question

a guest
Jan 23rd, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. // Set and open the class
  2. public class AddressBook {
  3.  
  4. // These are the variables for the class
  5. private String firstName;
  6. private String middleName;
  7. private String lastName;
  8. private String homeAddress;
  9. private String businessPhone;
  10. private String homePhone;
  11. private String cellPhone;
  12. private String skypeId;
  13. private String facebookId;
  14. private String personalWebsite;
  15.  
  16. // constructor for default level variables
  17. public AddressBook(String firstName, String middleName, String lastName, String homeAddress, String businessPhone,
  18. String homePhone, String cellPhone, String skypeId, String facebookId, String personalWebsite) {
  19. super();
  20. this.firstName = firstName;
  21. this.middleName = middleName;
  22. this.lastName = lastName;
  23. this.homeAddress = homeAddress;
  24. this.businessPhone = businessPhone;
  25. this.homePhone = homePhone;
  26. this.cellPhone = cellPhone;
  27. this.skypeId = skypeId;
  28. this.facebookId = facebookId;
  29. this.personalWebsite = personalWebsite;
  30. }
  31.  
  32. // Get and set
  33. public String getFirstName() {
  34. return firstName;
  35. }
  36.  
  37. public void setFirstName(String firstName) {
  38. this.firstName = firstName;
  39. }
  40.  
  41. public String getMiddleName() {
  42. return middleName;
  43. }
  44.  
  45. public void setMiddleName(String middleName) {
  46. this.middleName = middleName;
  47. }
  48.  
  49. public String getLastName() {
  50. return lastName;
  51. }
  52.  
  53. public void setLastName(String lastName) {
  54. this.lastName = lastName;
  55. }
  56.  
  57. public String getHomeAddress() {
  58. return homeAddress;
  59. }
  60.  
  61. public void setHomeAddress(String homeAddress) {
  62. this.homeAddress = homeAddress;
  63. }
  64.  
  65. public String getBusinessPhone() {
  66. return businessPhone;
  67. }
  68.  
  69. public void setBusinessPhone(String businessPhone) {
  70. this.businessPhone = businessPhone;
  71. }
  72.  
  73. public String getHomePhone() {
  74. return homePhone;
  75. }
  76.  
  77. public void setHomePhone(String homePhone) {
  78. this.homePhone = homePhone;
  79. }
  80.  
  81. public String getCellPhone() {
  82. return cellPhone;
  83. }
  84.  
  85. public void setCellPhone(String cellPhone) {
  86. this.cellPhone = cellPhone;
  87. }
  88.  
  89. public String getSkypeId() {
  90. return skypeId;
  91. }
  92.  
  93. public void setSkypeId(String skypeId) {
  94. this.skypeId = skypeId;
  95. }
  96.  
  97. public String getFacebookId() {
  98. return facebookId;
  99. }
  100.  
  101. public void setFacebookId(String facebookId) {
  102. this.facebookId = facebookId;
  103. }
  104.  
  105. public String getPersonalWebsite() {
  106. return personalWebsite;
  107. }
  108.  
  109. public void setPersonalWebsite(String personalWebsite) {
  110. this.personalWebsite = personalWebsite;
  111. }
  112.  
  113.  
  114.  
  115. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement