Question: need a java program with a specific output. please see pic attached. Define a class whose objects are records on animal species. The class should

need a java program with a specific output. please see pic attached.

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 percent.

Include a suitable collection of constructors, mutator methods, and accessor

methods. Include a toString 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.

Must create a Species Record class: SpeciesRecord.java

This is what the output needs to be:

need a java program with a specific output. please see pic attached.

Record is: Name: current population 0, growth rate: 0.004 Setting name. Record is now: Name: Unicorn, current population 0, growth. rate: 0.004 Record is Name Rabbit, current population. 0, growth rate 0.004 Record is Name Horse population 3000 growth rate 0.004 current Setting growth rate. Record is now: Name: Horse, current population: 3000 growth rate: 56.704 Record is Name Dodo, current population 0, growth rate 33.504 Setting population. Record is now: Name: Dodo, current population: 2, growth rate 33.505 Record is: Name: German Shepherd current population 550, growth rate 45.006 Getting population of rabbits: 0 Getting growth rate of German Shepherds 45.006 Getting name from first record Unicorn. The Dodo is red The r abbit is e ndangered false Horses and Unicorns are the same: false Making an identical object of German Shepherds Duplicate record is Name German Shepherd current population: 550 growth. rate: 45.004 Duplicate is same as original German Shepherd: true BUILD SUCCESSFUL total time 0 seconds

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!