Class Griffin

java.lang.Object
edu.nwmissouri.animalList.Animal
edu.nwmissouri.animalList.Griffin

public class Griffin extends Animal
The class Griffin, a subclass of Animal
Author:
Alexander Dieringer
  • Field Summary

    Fields inherited from class edu.nwmissouri.animalList.Animal

    gender, name
  • Constructor Summary

    Constructors
    Constructor
    Description
    Griffin constructor Creates an instance of the Griffin class, requires a name
  • Method Summary

    Modifier and Type
    Method
    Description
    static edu.nwmissouri.animalList.NumberParity
    calculateSumParity(int num1, int num2)
    calculateSumParity() - Calculates the parity of a 2 number sum
    boolean
    getIsExtinct() - Returns whether the animal is extinct or not
    getLatinName() - Returns the animal's Latin name
    getLocationFound() - Return the location the animal is found
    int
    getMovementSpeed() - Returns the max movement speed of the animal
    getMyName() - Returns the animal's name
    int
    getSleepDuration() - Return how long the animal sleeps
    getSpeciesName() - Returns the animal's species
    void
    move() - Describes the general type of movement the animal Griffin
    void
    speak() - Presents the types of sounds made by the Griffin

    Methods inherited from class edu.nwmissouri.animalList.Animal

    getGender, getName, setGender

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Griffin

      public Griffin(String name)
      Griffin constructor Creates an instance of the Griffin class, requires a name
      Parameters:
      name - The name we will be giving our new Griffin
  • Method Details

    • speak

      public void speak()
      speak() - Presents the types of sounds made by the Griffin
      Specified by:
      speak in class Animal
    • move

      public void move()
      move() - Describes the general type of movement the animal Griffin
      Specified by:
      move in class Animal
    • getMyName

      public String getMyName()
      getMyName() - Returns the animal's name
      Returns:
      The name of the animal as a String
    • getSpeciesName

      public String getSpeciesName()
      getSpeciesName() - Returns the animal's species
      Returns:
      The animal's species as a String
    • getLatinName

      public String getLatinName()
      getLatinName() - Returns the animal's Latin name
      Returns:
      The animal's Latin name as a String
    • getLocationFound

      public String getLocationFound()
      getLocationFound() - Return the location the animal is found
      Returns:
      The location of the animal as a String
    • getSleepDuration

      public int getSleepDuration()
      getSleepDuration() - Return how long the animal sleeps
      Returns:
      The length the animal sleeps in hours
    • getMovementSpeed

      public int getMovementSpeed()
      getMovementSpeed() - Returns the max movement speed of the animal
      Returns:
      How fast the animal can move in mph
    • getIsExtinct

      public boolean getIsExtinct()
      getIsExtinct() - Returns whether the animal is extinct or not
      Returns:
      Returns true or false on whether the animal is extinct
    • calculateSumParity

      public static edu.nwmissouri.animalList.NumberParity calculateSumParity(int num1, int num2)
      calculateSumParity() - Calculates the parity of a 2 number sum
      Parameters:
      num1 - The first integer to add up
      num2 - The second integer to add up
      Returns:
      The NumberParity enumerator holding ODD or EVEN