diff --git a/AnimalNoises.java b/AnimalNoises.java new file mode 100644 index 0000000..1e92700 --- /dev/null +++ b/AnimalNoises.java @@ -0,0 +1,31 @@ +//added semicolon to the end of import (Andrew Steele 01/10/2023) +import model.Example; +import model.Platypus; + +import model.Dog; +import model.Mountain_Lion; +import model.Cat; +public class AnimalNoises { + + // add your animal class to the model package + // only push this file and the animal class you created + + public static void main(String[] args) { + Example example = new Example(); + System.out.println(example.makeNoise()); + //created a new instance of the object and output the sound it makes + Platypus frank = new Platypus(); + System.out.println(frank.makeNoise()); + Dog Titan = new Dog(); + System.out.println(Titan.makeNoise()); + + Cat jordan = new Cat("Jordan",6,true); + System.out.println(jordan.getName() + " Age: " + jordan.getAge() + " Is Loved: " + jordan.getIsLoved()); + System.out.println(jordan.getName() + ": " + jordan.speak()); + + Mountain_Lion Bean = new Mountain_Lion("Bean", "Mountain Areas", 70.26); + System.out.println(Bean.getName() + " is a mountain lion that lives in: " + Bean.getHabitat() + " and weights about " + Bean.getWieght() + " pounds"); + System.out.println(Bean.makeNoise()); + } + +} diff --git a/model/Mountain_Lion.java b/model/Mountain_Lion.java new file mode 100644 index 0000000..6db053a --- /dev/null +++ b/model/Mountain_Lion.java @@ -0,0 +1,54 @@ +package model; + +/** + * @author Bradh + * CIS175 23290 Java II Spring 2023 + * Jan 17, 2023 + */ + +public class Mountain_Lion { + + private String name; + private String habitat; + private double wieght; + + public Mountain_Lion() { + super(); + // TODO Auto-generated constructor stub + } + + public Mountain_Lion(String name, String habitat, double wieght) { + super(); + this.name = name; + this.habitat = habitat; + this.wieght = wieght; + } + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getHabitat() { + return habitat; + } + public void setHabitat(String habitat) { + this.habitat = habitat; + } + public double getWieght() { + return wieght; + } + public void setWieght(double wieght) { + this.wieght = wieght; + } + + public String makeNoise() { + return "Mountain lions can scream. It's genuenly terrifying. Youtube it."; + } + + @Override + public String toString() { + return "Octopus [name=" + name + ", habitat=" + habitat + ", wieght=" + wieght + "]"; + } +}