Make a class called PopInfo that has private member variables: the current popul
ID: 3533899 • Letter: M
Question
Make a class called PopInfo that has private member variables: the current population (a long), the annual number of births (an int), the annual number of deaths (an int) and the city name (a string). The class needs at least one constructor; mutator functions, setPopulation(), setBirths(), setDeaths() and setCity(); and accessor functions, getPoPulation(), getBirths, getDeaths() and getCity(). Two additional member functions are getBirthrate() and getDeathrate() which return the birth and death rates (float or double values) calculated by the formulas given below.
birth rate = (number of births)/population_size
death rate = (number of deaths)/population_size
Data validation should be done in the class functions to ensure that population values are not less than 1 and that birth or death values are not less than 0.
The main() function should declare a PopInfo object in a way consistent with your constructor. The data for the object population, number of births, number of deaths, and city name should be read in from standard input. The values will be assigned to the object using the class mutator functions. Then the program should write out the city information, the birth rate and the death rate for each object using the accessor functions, the getBirthrate() and the getDeathrate() functions.
I want a complete program please!