Commit 22af10bc authored by elijah vasquez's avatar elijah vasquez 🦍

commits

parent 57cb7e37
public class Amphibians extends animal { public class Amphibians extends animal {
String amphibianAction;
Amphibians(String animalName, String givenName, String gender, String sound, String amphibianAction, int age, int lifespan, int height, int weight) {
super(animalName, givenName, gender, sound, age, lifespan, height, weight);
this.amphibianAction = amphibianAction;
}
} }
public class Fish extends animal{ public class Fish extends animal{
String fishAction;
Fish(String animalName, String givenName, String gender, String sound, String fishAction, int age, int lifespan, int height, int weight) {
super(animalName, givenName, gender, sound, age, lifespan, height, weight);
this.fishAction = fishAction;
}
} }
...@@ -2,7 +2,8 @@ public class Habitat { ...@@ -2,7 +2,8 @@ public class Habitat {
String habitatName; String habitatName;
int habitatTemp; int habitatTemp;
Habitat(String habitatName, int habitatTemp) { Habitat(String habitatName, int habitatTemp) {
this.habitatName = habitatName;
this.habitatTemp = habitatTemp;
} }
this.habitatName = habitatName;
this.habitatTemp = habitatTemp;
} }
public class Mammals extends animal { public class Mammals extends animal {
String mammalAction;
Mammals(String animalName, String givenName, String gender, String sound, String mammalAction, int age, int lifespan, int height, int weight) {
super(animalName, givenName, gender, sound, age, lifespan, height, weight);
this.mammalAction = mammalAction;
}
} }
public class Reptiles extends animal { public class Reptiles extends animal {
String reptileAction;
Reptiles(String animalName, String givenName, String gender, String sound, String reptileAction, int age, int lifespan, int height, int weight) {
super(animalName, givenName, gender, sound, age, lifespan, height, weight);
this.reptileAction = reptileAction;
}
} }
...@@ -5,12 +5,12 @@ public class main { ...@@ -5,12 +5,12 @@ public class main {
ArrayList<animal> animals = new ArrayList<animal>(); ArrayList<animal> animals = new ArrayList<animal>();
// Bird types // Bird types
animal batFalcon = new Birds("BatFalcon", "Griffith", "M", "Screech", "flies", 9, 18, 30, 230); animal batFalcon = new Birds("BatFalcon", "Griffith", "M", "Screech", "Soars", 9, 18, 30, 230);
batFalcon.dietType = new Carnivores("Bats"); batFalcon.dietType = new Carnivores("Bats");
batFalcon.habitat = new Habitat("Islands", 34); batFalcon.habitat = new Habitat("Islands", 34);
animals.add(batFalcon); animals.add(batFalcon);
//Reptile Types //Reptile Types
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment