Guest User

Untitled

a guest
Oct 17th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5. package TC.Objects;
  6.  
  7. /**
  8. *
  9. * @author Connerd
  10. */
  11. public class Human {
  12.  
  13. private String Name = null;
  14. private int Age = -1;
  15.  
  16. public Human(String Name, int Age) {
  17. setName(Name); // Calls "setName(String N)" with N as Name
  18. setAge(Age); // Calls "setAge(int i)" with i as Ages
  19. }
  20.  
  21. public void setName(String N) {
  22. this.Name = N; // Set this instance's Name to N
  23. }
  24.  
  25. public String getName() {
  26. return this.Name; // Returns this instance's Name
  27. }
  28.  
  29. public void setAge(int i) {
  30. this.Age = i; // Set this instance's Age to i
  31. }
  32.  
  33. public int getAge() {
  34. return this.Age; // Returns this instance's Age
  35. }
  36. }
Add Comment
Please, Sign In to add comment