Species Class (C++) (50): Create a class called Species that might be used by the research cell of the International Un

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
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

Post by answerhappygod »

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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply