We're Open
support@instaresearch.co.uk
+44 7340 9595 39
+44 20 3239 6980

DISPLAY LOCAL DATE TIME USING VALUES FROM THE PARAMETERS

Information



  • Post Date 2020-04-04T09:48:01+00:00
  • Post Category Assignment Queries

No Plagiarism Guarantee - 100% Custom Written

Order Details

DISPLAY LOCAL DATE TIME USING VALUES FROM THE PARAMETERS

In this paper, you are required to derive class Week-Day from class Date-Time. You are required to display local date time using values from the parameters.

Derive class WeekDay from class DateTime such that WeekDay::display() will display local date time using values from the parameters and the corresponding weekday. For a handy online weekday calculator: What Day is this Date? 

 

class WeekDay : public DateTime {

public:

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

void display();

};

 

Implement

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

    Validate the parameter values the same ways as in DateTime().

    void display();

    display the local date time and the corresponding weekday.

You have to provide:

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

    an class implementation file weekday.cpp.

    a text file task_2_2.txt containing compilation messages and sample runs.

 

Note

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

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

    There is no need to implement error exception.

 

You may use sample_WD_app.cpp to test your implementation. Expected output:

 

C:>a

01/02/15 03:04:05 is Friday

01/02/15 03:04:00 is Friday

01/02/15 03:00:00 is Friday

01/02/15 00:00:00 is Friday

 

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

 

Marking Criteria

Marks

WeekDay()

2

display()

2

weekday.h with code to prevent multiple inclusion.

2

weekday.cpp

2

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

2

 

 


Price: £ 109

100% Plagiarism Free & Custom Written, Tailored to your instructions