From f3fcd8cac652fe659fd74d19cc66085239d02419 Mon Sep 17 00:00:00 2001 From: Chance Benna Date: Tue, 17 Jan 2023 23:48:33 -0600 Subject: [PATCH] added red_panda --- src/AnimalNoises.java | 3 ++ src/model/Red_Panda.java | 80 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 src/model/Red_Panda.java diff --git a/src/AnimalNoises.java b/src/AnimalNoises.java index b2193c5..fcb3972 100644 --- a/src/AnimalNoises.java +++ b/src/AnimalNoises.java @@ -20,5 +20,8 @@ public static void main(String[] args) { Siamang monk = new Siamang(); System.out.println(monk.makeNoise()); + + Red_Panda stinky = new Red_Panda(); + System.out.println(stinky.makeNoise()); } } diff --git a/src/model/Red_Panda.java b/src/model/Red_Panda.java new file mode 100644 index 0000000..3de9bbf --- /dev/null +++ b/src/model/Red_Panda.java @@ -0,0 +1,80 @@ +package model; + +/** + * @author cbenna + * CIS175 - Spring 2023 + * Jan 17, 2023 + */ +public class Red_Panda { + private String habitat; + private String name; + private int length; + + public Red_Panda() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * @param habitat + * @param name + * @param length + */ + public Red_Panda(String habitat, String name, int length) { + super(); + this.habitat = habitat; + this.name = name; + this.length = length; + } + + /** + * @return the habitat + */ + public String getHabitat() { + return habitat; + } + + /** + * @param habitat the habitat to set + */ + public void setHabitat(String habitat) { + this.habitat = habitat; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the length + */ + public int getLength() { + return length; + } + + /** + * @param length the length to set + */ + public void setLength(int length) { + this.length = length; + } + + @Override + public String toString() { + // TODO Auto-generated method stub + return "Red Panda [name=" + name + ", length=" + length + "inches, habitat=" + habitat + "]"; + } + public String makeNoise() { + return "Urf!"; + } +}