diff --git a/.project b/.project new file mode 100644 index 0000000..9976d80 --- /dev/null +++ b/.project @@ -0,0 +1,11 @@ + + + ZooDMACCJava2Spring2024 + + + + + + + + diff --git a/Zoo/bin/.gitignore b/Zoo/bin/.gitignore new file mode 100644 index 0000000..a8efae8 --- /dev/null +++ b/Zoo/bin/.gitignore @@ -0,0 +1,2 @@ +/model/ +/main/ diff --git a/Zoo/bin/main/Runner.class b/Zoo/bin/main/Runner.class index 87c83e6..f2b1112 100644 Binary files a/Zoo/bin/main/Runner.class and b/Zoo/bin/main/Runner.class differ diff --git a/Zoo/bin/model/Example.class b/Zoo/bin/model/Example.class index 3375ca8..bc3d481 100644 Binary files a/Zoo/bin/model/Example.class and b/Zoo/bin/model/Example.class differ diff --git a/Zoo/src/main/Runner.java b/Zoo/src/main/Runner.java index ed1b309..dd9699c 100644 --- a/Zoo/src/main/Runner.java +++ b/Zoo/src/main/Runner.java @@ -1,5 +1,6 @@ package main; +import model.Elephant; import model.Example; public class Runner { @@ -13,5 +14,9 @@ private void go() { Example example = new Example(); example.makeNoise(); + Elephant elephant = new Elephant("Savanna", "Blue", 28.4); + + System.out.println(elephant.makeNoise()); + } } diff --git a/Zoo/src/model/Elephant.java b/Zoo/src/model/Elephant.java new file mode 100644 index 0000000..d425e72 --- /dev/null +++ b/Zoo/src/model/Elephant.java @@ -0,0 +1,61 @@ +/** + * @author Cory Howard - clhoward1 + * CIS175 - Spring 2024 + * Jan 25, 2024 + */ +package model; + +public class Elephant { + private String habitat; + private String name; + private double length; + + + /** + * Constructors + */ + public Elephant() { + super(); + } + + public Elephant(String habitat, String name, double length) { + super(); + this.habitat = habitat; + this.name = name; + this.length = length; + } + + + /** + * Getters and Setters + */ + public String getHabitat() { + return habitat; + } + public void setHabitat(String habitat) { + this.habitat = habitat; + } + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + public double getLength() { + return length; + } + public void setLength(int length) { + this.length = length; + } + + @Override + public String toString() { + return "Example [name=" + name + ", length=" + length + "inches, habitat=" + habitat + "]"; + } + + public String makeNoise() { + return "Toot!"; + } +} \ No newline at end of file