Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package TC.Objects;
- /**
- *
- * @author Connerd
- */
- public class Human {
- private String Name = null;
- private int Age = -1;
- public Human(String Name, int Age) {
- setName(Name); // Calls "setName(String N)" with N as Name
- setAge(Age); // Calls "setAge(int i)" with i as Ages
- }
- public void setName(String N) {
- this.Name = N; // Set this instance's Name to N
- }
- public String getName() {
- return this.Name; // Returns this instance's Name
- }
- public void setAge(int i) {
- this.Age = i; // Set this instance's Age to i
- }
- public int getAge() {
- return this.Age; // Returns this instance's Age
- }
- }
Add Comment
Please, Sign In to add comment