From e005dccce617cc7036807bd2761d471c232680b0 Mon Sep 17 00:00:00 2001 From: clhoward1 Date: Thu, 25 Jan 2024 21:58:08 -0600 Subject: [PATCH] added elephant class --- .project | 11 +++++++ Zoo/bin/.gitignore | 2 ++ Zoo/bin/main/Runner.class | Bin 612 -> 926 bytes Zoo/bin/model/Example.class | Bin 1751 -> 1495 bytes Zoo/src/main/Runner.java | 5 +++ Zoo/src/model/Elephant.java | 61 ++++++++++++++++++++++++++++++++++++ 6 files changed, 79 insertions(+) create mode 100644 .project create mode 100644 Zoo/bin/.gitignore create mode 100644 Zoo/src/model/Elephant.java 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 87c83e62b518850c14c2c798e4b5e24d3737cfa9..f2b1112fa35fce3f3af4375b14ba0e07a54472b8 100644 GIT binary patch delta 461 zcmZvY+e!ja6o&tm=8WShHH$JlRCq{hI%ioBVO<$Sg5l*rlNmFk)EIT;L(Ek-y@OpS zB=i71NAwucQoBfM-)#2U|NpIjtq=RNAiaORz5zJEep`xDOF)$1)$5n4CLe2R<61FH z5pjZ0QtlPQP(&;c>_=KtbsX+r4UU8el5UJ6MM$NJH!PGj#i+_9^R{MG^M5OablHg| zWCdgh6Tb|t$2(Ki-B`v7!B%gYgwW7ltIKChGnuI>dcNN?EMW~B0@ew^0b^9-#wNBn zc%yIA3?}`PEnQ}X`k?3yO(poO9Qnhd`ZG9ZD~_(hI-zrNSWi@NIw3-W8!qdU(yb;O zu<;&~Jxo`+m?>sDn7!yBQVGNY^OIQYB60eHbhZPzgVi=m$Jh=`@!kM0!+h|-k2wU9 hKnO0b#)e34;^CKwD7LW!VvP$q>@tC{$3J}MzX6oFX1D+V delta 133 zcmbQo{)C0=)W2Q(7#J9A8I(41DKbu$VUn91!Q{`#I(Y??3nvEy2LmSq4+GcauS}Yu zUJOh?$iTq2n?XEsJAQCI&?Su6q%~ diff --git a/Zoo/bin/model/Example.class b/Zoo/bin/model/Example.class index 3375ca82adb3a652bdcf0ed5ef2017d5555f364a..bc3d4818e35d13b66c1414bf26e211cd8c26f1d5 100644 GIT binary patch delta 351 zcmZ{g%}T>i5QWdAP}3MiLs6ksyGS*ytu_AF8U?|HAcDG*;^JyAO*Dz6jpELw8&~E< z6eWU!58w;rZNwYv*3FrZfpg|39*PH*ukZIy02a2Nl}9=nzzkvhg59v1%lvljIOsZl zd*|A5Tf8g7APn!`GOy$ELepm+w-gjnR-s@rp^Azs<_T%m>2SYAs2X8R`rThZL&gFj zQz^LIZwL0Tc`>mp5%R`fY5$+W!nZ;gar|?e_bLUOojCyuEE#JAI!y-GRp`ixY>!>? zgDa=UWo#1U{<2|KntFLk-AnZ*QXp}!`GMkzHv5KB`4wXk=Cqm+!4nZoZMo0cq`xX8 m!g_d^&QF^dg(lpD4djHXf~%q?i7BlSKBV;wiC+Q|wtfJ^Do)z~ delta 603 zcmaJ;%}!H66#mYwrL~k$8lngUN>V64#i}TXm%E{XK!UQs#06n7lu7TUw=+#=B(Un% zt#;!xup_u)!2|dLeG49ea7vrlM&shl`OcZ|{I>>MLy6z_H@5&hcvp!Z7IF_2< zoLqyD+SJ+_TNkyD()#+uB=8DvVt7r+{>c=mGhLD0gq_0MqGWabqTSI7;b(8%F1wR( zN2rrfn(Us|m9I6ouf6ZBRHKjl`JyKKDUTBz_C)O;pURST7kXUX6h#q+2Z5FD@Bj*N ztP+;C&PBBr%FLk>Rq0Va6G~OKzDI#7`O@SwenT7wR#=aY2+3WgWW5*)W2A{;oiO{? z3jQ@z47}W_|5FJAoef|Hga{uq0tZoC-#X{c_y(S^7f3Ju!ZVgJmeCu`0!2}bYn0ULPn0Bdun!2kdN 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