Class Dalmatian

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

public class Dalmatian extends Animal
Dalmatian class (derived subclass of the superclass Animal)
Author:
Nikhil Porika
  • Constructor Details

    • Dalmatian

      public Dalmatian(String name)
  • Method Details

    • speak

      public void speak()
      Determines the animal speak
      Specified by:
      speak in class Animal
    • move

      public void move()
      Determines the animal move
      Specified by:
      move in class Animal
    • eat

      public void eat()
      Determines the animal eat
    • cal

      public void cal()
      This method will initialize the values and calls the addition method
    • getDalmatianaddition

      public double getDalmatianaddition(double number1, double number2)
      This method will calculate the addition of two numbers
      Parameters:
      number1 - it will take the first double value
      number2 - it will take the second double value
      Returns:
      it returns the addition of 2 numbers