Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //January 23, 2015
- public class Dog{
- private String Bark, EyeColor, FurColor; //instance variables
- private int Age;
- public Dog(){ //contructor, builds the dog itself
- Bark = "Woof";
- FurColor = "Tannish Brown";
- EyeColor = "Brown";
- Age = 1;
- }
- public Dog(String DogBark, String DogFurColor, String DogEyeColor, int DogAge){
- Bark = DogBark; //Contructor that allows us to specify the attributes of the Dog object
- FurColor = DogFurColor;
- EyeColor = DogEyeColor;
- Age = DogAge;
- }
- public String Bark(){
- return Bark;
- }
- public void SetAge(int DogAge){
- Age = DogAge;
- }
- public int GetAge(){
- return Age;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement