Class ProngHorn

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

public class ProngHorn extends Animal
This is ProngHorn animal class.(derived subclass of the superclass Animal)
Author:
Alekhya Gandra
  • Field Summary

    Fields inherited from class edu.nwmissouri.animalList.Animal

    gender, name
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    getProngHornAddition(double valueOne, int valueTwo)
    Custom ProngHorn function - your class must use a unique function name unique first parameter identifier unique second parameter identifier do something creative
    void
    This is move method which is used to to print the message print the statement
    void
    mul(int a, int b)
    function mul gives multiplication
    void
    function profess1 calls the getProngHornAddition method
    void
    This is speak method which is used to to print the message print the statement
    void
    sub(int a, int b)
    function sub gives subtarction

    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

    • ProngHorn

      public ProngHorn(String name)
  • Method Details

    • speak

      public void speak()
      This is speak method which is used to to print the message print the statement
      Specified by:
      speak in class Animal
    • move

      public void move()
      This is move method which is used to to print the message print the statement
      Specified by:
      move in class Animal
    • mul

      public void mul(int a, int b)
      function mul gives multiplication
      Parameters:
      a -
      b -
    • sub

      public void sub(int a, int b)
      function sub gives subtarction
      Parameters:
      a -
      b -
    • getProngHornAddition

      public double getProngHornAddition(double valueOne, int valueTwo)
      Custom ProngHorn function - your class must use a unique function name unique first parameter identifier unique second parameter identifier do something creative
      Parameters:
      valueOne - double input
      valueTwo - int input
      Returns:
      double sum
    • profess1

      public void profess1()
      function profess1 calls the getProngHornAddition method