Species Class (C++) (50): Create a class called Species that might be used by the research cell of the International Un
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Species Class (C++) (50): Create a class called Species that might be used by the research cell of the International Un
Species Class (C++) (50):Create a class called Species that might beused by the research cell of the International Union forConservation of Nature (IUCN) to represent each endangered speciesthroughout the globe.A species should include four data members:Name (type string)Country (type string)Population (type int)GrowthRate (type int).Your class should have a constructor that initializes the fourdata members. Provide a set and aget function for each data member.In addition, provide a member function namedcalculatePopulation that takes an int typevariable year and displays the population of the species after thatmany years.P=P0ertP0: Initial populationr: GrowthRatet: Year (type int)Write a test program that demonstrates theclass’s capabilities.