Define a class whose objects are records on animal species


QUestion: Define a class whose objects are records on animal species. The class should have instance variables for the species name, population, and growth rate. The growth rate is a percentage that can be positive or negative and can exceed 100%. Include a suitable collection of constructors, mutator methods, and accessor methods. Include a to String method and an equals method. Include a boolean valued method named endangered that returns true when the growth rate is negative and returns false otherwise. Write a test program (or programs) that tests each method in your class definition.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Define a class whose objects are records on animal species
Reference No:- TGS02404418

Now Priced at $15 (50% Discount)

Recommended (96%)

Rated (4.8/5)