Advertisement
goalCreateSupremeBot

Untitled

Feb 28th, 2020
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. package Students;
  2.  
  3. public class Student {
  4. private String firstName;
  5. private String lastName;
  6. private int age;
  7. private String hometown;
  8.  
  9. public Student(String firstName, String lastName, int age, String hometown) {
  10. this.firstName = firstName;
  11. this.lastName = lastName;
  12. this.age = age;
  13. this.hometown = hometown;
  14. }
  15.  
  16. public String getFirstName() {
  17. return firstName;
  18. }
  19.  
  20. public void setFirstName(String firstName) {
  21. this.firstName = firstName;
  22. }
  23.  
  24. public String getLastName() {
  25. return lastName;
  26. }
  27.  
  28. public void setLastName(String lastName) {
  29. this.lastName = lastName;
  30. }
  31.  
  32. public int getAge() {
  33. return age;
  34. }
  35.  
  36. public void setAge(int age) {
  37. this.age = age;
  38. }
  39.  
  40. public String getHometown() {
  41. return hometown;
  42. }
  43.  
  44. public void setHometown(String hometown) {
  45. this.hometown = hometown;
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement