Assignment 7 - Constructing the World Population

due  November 19th

The purpose of this assignment is to give you practice using constructors and destructors.


Program Overview

The goal of this assignment is to create a partial model of a population system, emulating the aging and dying of a population.


Program Requirements

Class Descriptions

The Date class is used to represent calendar dates.  As a minimum, the class must contain:
The Human class must contain at least:
The Population class must contain:
float rollTheDice(unsigned short age)
{
    return static_cast<float>(age)*(rand()%100)/10000.;
}

Assumptions

Date TODAY;        // Make sure you define this after your define the Date class
unsigned DaysPerMonth[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
const string NAMES[] =
{
    "Luis","Arbouz","Nathan","Christine","Jorge","Chase","Jamie","Ryan",
    "James","Kyle","Sunan","Houman","Sofia","Joy","Chen","Donovan",
    "Jason","William","Yuqin","Alex","Mohammed","Yusuf","Dalver",
    "Dustin","Thomas","Lawrence","Zuiyun","Udyog","Umar","Gursewak","Robabeh",
    "Shanli","Norman","Colin","Manmeet Singh","Rajesh","Janice","Atiq",
    "Ayumi","Richard","Rose Marie","Tina Marie","Miles","Mengqing","Shu Hui","Yujing"

};


The main() function

You are required to use this main():

int main()
{
    const int OriginalPopulationSize = 46;

    srand(time(0));
    Population World(OriginalPopulationSize);
    World.print();

    // let time pass until half of the world's Population dies
    do
    {
        TODAY.letTimePass();
        World.examinePopulation();
    }
    while (World.getNumberLiving() > OriginalPopulationSize/2);

    World.print();
}

Program Output

Your output should look similar to the following.  

-----------------------------------------------
Today is 08/23/18
Luis was born on 02/11/18 is 100
Arbouz was born on 07/24/68 is 50
Nathan was born on 05/06/35 is 83
Christine was born on 07/22/90 is 28
Jorge was born on 06/26/70 is 48
Chase was born on 01/19/61 is 57
Jamie was born on 06/05/49 is 69
Ryan was born on 05/19/98 is 20
James was born on 10/27/91 is 26
Kyle was born on 12/24/84 is 33
Sunan was born on 08/15/33 is 85
Houman was born on 01/22/95 is 23
Sofia was born on 09/28/81 is 36
Joy was born on 01/27/64 is 54
Chen was born on 04/10/45 is 73
Donovan was born on 05/07/19 is 99
Jason was born on 03/15/26 is 92
William was born on 09/12/50 is 67
Yuqin was born on 03/21/31 is 87
Alex was born on 11/19/32 is 85
Mohammed was born on 09/07/06 is 11
Yusuf was born on 12/26/57 is 60
Dalver was born on 09/07/28 is 89
Dustin was born on 06/03/18 is 100
Thomas was born on 10/20/18 is 99
Lawrence was born on 11/26/51 is 66
Zuiyun was born on 09/12/65 is 52
Udyog was born on 03/30/69 is 49
Umar was born on 12/27/71 is 46
Gursewak was born on 06/21/72 is 46
Robabeh was born on 11/30/32 is 85
Shanli was born on 06/26/77 is 41
Norman was born on 06/11/58 is 60
Colin was born on 08/04/49 is 69
Manmeet Singh was born on 02/13/23 is 95
Rajesh was born on 07/08/72 is 46
Janice was born on 04/10/88 is 30
Atiq was born on 01/02/90 is 28
Ayumi was born on 08/22/64 is 54
Richard was born on 02/02/45 is 73
Rose Marie was born on 08/02/96 is 22
Tina Marie was born on 03/12/83 is 35
Miles was born on 10/04/03 is 14
Mengqing was born on 01/18/01 is 17
Shu Hui was born on 05/22/66 is 52
Yujing was born on 10/09/30 is 87
-------------------------------------------------
02/16/19 Nathan died at the age of 83
02/16/19 Donovan died at the age of 99
02/16/19 William died at the age of 68
02/16/19 Lawrence died at the age of 67
02/25/19 Jason died at the age of 92
02/25/19 Yuqin died at the age of 87
02/25/19 Dalver died at the age of 90
02/25/19 Dustin died at the age of 100
02/25/19 Robabeh died at the age of 86
02/25/19 Manmeet Singh died at the age of 96
05/19/19 Luis died at the age of 101
05/19/19 Chase died at the age of 58
05/19/19 Richard died at the age of 74
05/19/19 Yujing died at the age of 88
07/29/19 Jamie died at the age of 70
07/29/19 Thomas died at the age of 100
11/01/19 Joy died at the age of 55
11/01/19 Chen died at the age of 74
11/01/19 Alex died at the age of 86
03/22/21 Sunan died at the age of 87
03/22/21 Colin died at the age of 71
04/24/21 Yusuf died at the age of 63
06/05/23 Jorge died at the age of 52
06/05/23 Zuiyun died at the age of 57
-----------------------------------------------
Today is 06/05/23
Arbouz was born on 07/24/68 is 54
Christine was born on 07/22/90 is 32
Ryan was born on 05/19/98 is 25
James was born on 10/27/91 is 31
Kyle was born on 12/24/84 is 38
Houman was born on 01/22/95 is 28
Sofia was born on 09/28/81 is 41
Mohammed was born on 09/07/06 is 16
Udyog was born on 03/30/69 is 54
Umar was born on 12/27/71 is 51
Gursewak was born on 06/21/72 is 50
Shanli was born on 06/26/77 is 45
Norman was born on 06/11/58 is 64
Rajesh was born on 07/08/72 is 50
Janice was born on 04/10/88 is 35
Atiq was born on 01/02/90 is 33
Ayumi was born on 08/22/64 is 58
Rose Marie was born on 08/02/96 is 26
Tina Marie was born on 03/12/83 is 40
Miles was born on 10/04/03 is 19
Mengqing was born on 01/18/01 is 22
Shu Hui was born on 05/22/66 is 57
-------------------------------------------------