Question: User-Defined Classes /Pointers Q1. (25 marks) Consider the following class: #ifndef DATEH #define DATE H - class Date public: Date (int-l, int-1, int-2000)11 sets day,

User-Defined Classes /Pointers

User-Defined Classes /Pointers Q1. (25 marks) Consider the following class: #ifndef DATEH#define DATE H - class Date public: Date (int-l, int-1, int-2000)11 sets

Q1. (25 marks) Consider the following class: #ifndef DATEH #define DATE H - class Date public: Date (int-l, int-1, int-2000)11 sets day, month, year void setDate (int, int, int); // sets the date void printDate O const: // prints date to the screern private: int day; int month; int year; #endif /* DATEH*/ - - /* date.cpp */ # include #include "date . h" using namespace std; // Constructor Date: Date (int d, int m, int y) day = d; month m; year = y

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!