This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//name of class | |
public class Agent { | |
private String name; | |
private Integer heightInCM; | |
//default constructor | |
public Agent() { | |
this.name = "Smith"; | |
this.heightInCM = 177; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0xAa7d17248977FD7d37D2eAa56aAc7f9A4E520956 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0xbA7e855928B7ba725A4c8ef5c3eB849624e740F2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Owl { | |
private String name; | |
private int age; | |
public Owl(String name, int age) { | |
this.name = name; | |
this.age = age; | |
} | |
public int getAge() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Parrot { | |
private String name; | |
private int age; | |
public Parrot(String name, int age) { | |
this.name = name; | |
this.age = age; | |
} | |
public int getAge() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BaldEagle { | |
private String name; | |
private int age; | |
public BaldEagle(String name, int age) { | |
this.name = name; | |
this.age = age; | |
} | |
public int getAge() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Bird { | |
private String name; | |
private int age; | |
public Bird(String name, int age) { | |
this.name = name; | |
this.age = age; | |
} | |
public int getAge() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Owl extends Bird { | |
public Owl(String name, int age) { | |
super(name, age); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Parrot extends Bird { | |
public Parrot(String name, int age) { | |
super(name, age); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Owl extends Bird { | |
private String color; | |
public Owl(String name, int age, String color) { | |
super(name, age); | |
this.color = color; | |
} | |
public String getColor() { |