CALCULATED USING THE BIRTHDATE AND THE CURRENT DAT

CALCULATED USING THE BIRTHDATE AND THE CURRENT DATE

The primary theme of the paper is CALCULATED USING THE BIRTHDATE AND THE CURRENT DATE in which you are required to emphasize its aspects in detail. The cost of the paper starts from $109 and it has been purchased and rated 4.9 points on the scale of 5 points by the students. To gain deeper insights into the paper and achieve fresh information, kindly contact our support.

Derive class Days2Go from class DateTime such that Days2GoAge::display() will display birthdate in local date time format using values from the parameters and the number of days before your next birthday. The current date used in the sample run is assumed to be 15/04/2015.

 

class Days2Go : public Age {

public:

Days2Go(int y, int m, int d, int h = 0, int min = 0, int s = 0);

void display();

private:

int days;

};

 

Implement

    Days2Go(int y, int m, int d, int h = 0, int min = 0, int s = 0);

    2016 is a leap year.

    Birth year may be a leap year. You have to consider 29 Feb.

    void display();

      Display the local date time created as birthdate; the current date and the age calculated using the birthdate and the current date.

You have to provide:

 

    a header file days2go.h with code to prevent multiple inclusion.

    an class implementation file days2go.cpp.

    a text file task_2_4.txt containing compilation messages and sample runs. Note

      You have to include the code for class DateTime and class Age in days2go.h and days2go.cpp.

      Do not modify class DateTime, Age and Days2Go public and protected sections. You may add private members (data/functions) only.

    There is no need to implement error exception.

 

You may use sample_DTG_app.cpp to test your implementation. Assuming the current date is

15/04/2015, expected output:

 

C:>a

Birthday: 04/14/94 00:00:00

Current date: 04/15/15 15:32:15

Days before next birthday: 364

 

Birthday: 04/15/94 00:00:00

Current date: 04/15/15 15:32:15

Days before next birthday: 0

 

Birthday: 04/16/94 00:00:00

Current date: 04/15/15 15:32:15

Days before next birthday: 1

 

Birthday: 05/15/00 00:00:00

Current date: 04/15/15 15:32:15

Days before next birthday: 30

 

You should also use your own test cases to test for error inputs.

 

Marking Criteria

Marks

Days2Go()

6

display()

4

days2go.h with code to prevent multiple inclusion.

2

days2go.cpp

4

Compilation messages and sample run outputs (if the program runs correctly)

2

 

100% Plagiarism Free & Custom Written
Tailored to your instructions