Class Okapi

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

public class Okapi extends Animal
This class defines the nature of the Okapi animal.
Author:
Pranay bhargav reddy bakaram(s545147)
  • Constructor Details

    • Okapi

      public Okapi(String name)
  • Method Details

    • speak

      public void speak()
      Description copied from class: Animal
      abstract speak() - has no implementation
      Specified by:
      speak in class Animal
    • move

      public void move()
      Description copied from class: Animal
      abstract move() - has no implementation
      Specified by:
      move in class Animal
    • eat

      public void eat()
    • addition

      public void addition()
    • getOkapiAddition

      public double getOkapiAddition(double x, int y)
      This method will calculate the sum of two numbers
      Parameters:
      x - double value which is passed from addition()
      y - int value which is passed from addition()
      Returns:
      it returns the sum of two numbers