Commit 6de8e4c3 authored by elijah vasquez's avatar elijah vasquez 🦍

commits

parent 22af10bc
public class Aquatic extends Habitat {
Aquatic(String habitatName, int habitatTemp) {
super(habitatName, habitatTemp);
}
}
public class Desert extends Habitat {
Desert(String habitatName, int habitatTemp) {
super(habitatName, habitatTemp);
}
}
public class Forest extends Habitat {
Forest(String habitatName, int habitatTemp) {
super(habitatName, habitatTemp);
}
}
public class Grassland extends Habitat {
Grassland(String habitatName, int habitatTemp) {
super(habitatName, habitatTemp);
}
}
public class Omnivores extends Diet {
Omnivores(String foodName) {
String foodName2;
Omnivores(String foodName, String foodName2) {
super(foodName);
this.foodName2 = foodName2;
}
}
public class Tundra extends Habitat {
Tundra(String habitatName, int habitatTemp) {
super(habitatName, habitatTemp);
}
}
public class animal {
String animalName, givenName, gender, sound;
int age, lifespan, height, weight;
int age, lifespan, height, weight; // Weight is in grams (g)
Habitat habitat;
Diet dietType;
animal(String animalName, String givenName, String gender, String sound, int age, int lifespan, int height, int weight) {
......
......@@ -4,25 +4,94 @@ public class main {
public static void main(String[] args) throws Exception {
ArrayList<animal> animals = new ArrayList<animal>();
// Bird types
animal batFalcon = new Birds("BatFalcon", "Griffith", "M", "Screech", "Soars", 9, 18, 30, 230);
// *****Bird types*****
animal batFalcon = new Birds("Bat Falcon", "Griffith", "M", "Screech", "Soars", 9, 18, 30, 230);
batFalcon.dietType = new Carnivores("Bats");
batFalcon.habitat = new Habitat("Islands", 34);
batFalcon.habitat = new Habitat("Forest", 34);
animals.add(batFalcon);
animal snowyOwl = new Birds("Snowy Owl", "Hedwig", "M", "Screech", "Glides", 10, 10, 70, 3000);
snowyOwl.dietType = new Carnivores("Mice");
snowyOwl.habitat = new Habitat("Tundra", 3);
animals.add(snowyOwl);
animal greaterRoadrunner = new Birds("Greater Roadrunner", "Speedy", "F", "Hun", "Runs and jumps", 5, 8, 26, 240);
greaterRoadrunner.dietType = new Carnivores("Spiders");
greaterRoadrunner.habitat = new Habitat("Desert", 3);
animals.add(greaterRoadrunner);
//Reptile Types
animal brewersBlackbird = new Birds("Brewer's Blackbird", "Paul", "M", "Tweet", "Pecks", 10, 10, 26, 3000);
brewersBlackbird.dietType = new Omnivores("Insects", "Berries");
brewersBlackbird.habitat = new Habitat("Grassland", 25);
animals.add(brewersBlackbird);
// *****Reptile Types*****
animal marineIguana = new Reptiles("Marine Iguana", "Marley", "M", "Hiss", "Swims", 9, 12, 12, 10000);
marineIguana.dietType = new Herbivores("Algae");
marineIguana.habitat = new Habitat("Aquatic", 20);
animals.add(marineIguana);
//Mammal Types
animal sideWinder = new Reptiles("Sidewinder", "Hissy Fit", "F", "Hiss", "Slithers", 17, 20, 80, 304);
sideWinder.dietType = new Carnivores("Lizards");
sideWinder.habitat = new Habitat("Desert", 40);
animals.add(sideWinder);
animal forestCobra = new Reptiles("Snowy Owl", "Hedwig", "M", "Screech", "Glides", 10, 10, 70, 3000);
forestCobra.dietType = new Carnivores("Mice");
forestCobra.habitat = new Habitat("Forest", 3);
animals.add(forestCobra);
//Fish Types
animal leopardTortoise = new Reptiles("Snowy Owl", "Hedwig", "M", "Screech", "Glides", 10, 10, 70, 3000);
leopardTortoise.dietType = new Carnivores("Mice");
leopardTortoise.habitat = new Habitat("Grassland", 3);
animals.add(leopardTortoise);
// *****Mammal Types*****
animal northamericanBeaver = new Mammals("Bat Falcon", "Griffith", "M", "Screech", "Soars", 9, 18, 30, 230);
northamericanBeaver.dietType = new Carnivores("Bats");
northamericanBeaver.habitat = new Habitat("Aquatic", 34);
animals.add(northamericanBeaver);
//Amphibian Types
animal meerkat = new Mammals("Snowy Owl", "Hedwig", "M", "Screech", "Glides", 10, 10, 70, 3000);
meerkat.dietType = new Carnivores("Mice");
meerkat.habitat = new Habitat("Desert", 3);
animals.add(meerkat);
animal silverbackGorilla = new Mammals("Snowy Owl", "Hedwig", "M", "Screech", "Glides", 10, 10, 70, 3000);
silverbackGorilla.dietType = new Carnivores("Mice");
silverbackGorilla.habitat = new Habitat("Forest", 3);
animals.add(silverbackGorilla);
animal cheetah = new Mammals("Snowy Owl", "Hedwig", "M", "Screech", "Glides", 10, 10, 70, 3000);
cheetah.dietType = new Carnivores("Mice");
cheetah.habitat = new Habitat("Grassland", 3);
animals.add(cheetah);
animal arcticFox = new Mammals("Snowy Owl", "Hedwig", "M", "Screech", "Glides", 10, 10, 70, 3000);
arcticFox.dietType = new Carnivores("Mice");
arcticFox.habitat = new Habitat("Tundra", 3);
animals.add(arcticFox);
// *****Fish Types*****
animal greatwhiteShark = new Fish("Bat Falcon", "Griffith", "M", "Screech", "Soars", 9, 18, 30, 230);
greatwhiteShark.dietType = new Carnivores("Bats");
greatwhiteShark.habitat = new Habitat("Aquatic", 34);
animals.add(greatwhiteShark);
// *****Amphibian Types*****
animal axolotl = new Amphibians("Bat Falcon", "Griffith", "M", "Screech", "Soars", 9, 18, 30, 230);
axolotl.dietType = new Carnivores("Bats");
axolotl.habitat = new Habitat("Aquatic", 34);
animals.add(axolotl);
animal desertToad = new Amphibians("Bat Falcon", "Griffith", "M", "Screech", "Soars", 9, 18, 30, 230);
desertToad.dietType = new Carnivores("Bats");
desertToad.habitat = new Habitat("Desert", 34);
animals.add(desertToad);
animal woodFrog = new Amphibians("Bat Falcon", "Griffith", "M", "Screech", "Soars", 9, 18, 30, 230);
woodFrog.dietType = new Carnivores("Bats");
woodFrog.habitat = new Habitat("Tundra", 34);
animals.add(woodFrog);
}
}
\ No newline at end of file
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