#include #include #include "date.h" using namespace std; //Output the dates for the Summer 2025 CISC-2000-L11. int main() { const date a[] { //an array of 15 objects { 5, 27, 2025}, //Call the constructor with three arguments. { 5, 28, 2025}, { 5, 29, 2025}, { 6, 3, 2025}, { 6, 4, 2025}, { 6, 5, 2025}, { 6, 10, 2025}, { 6, 11, 2025}, { 6, 12, 2025}, { 6, 17, 2025}, { 6, 18, 2025}, { 6, 20, 2025}, //Friday { 6, 24, 2025}, { 6, 25, 2025}, { 6, 26, 2025} //Don't need comma. }; const size_t n {size(a)}; //the number of elements in the array //Loop through the array with an int i for (int i {0}; i < n; ++i) { a[i].print(); //Call the print member func of the object a[i] cout << "\n"; } cout << "\n"; //Skip a line. //Loop through the array with a pointer p for (const date *p {a}; p < a+n; ++p) { //a means &a[0]; a+n means &a[n] p->print(); //Call the print member function of the object ... cout << "\n"; //... that p points to. } cout << "\n"; //Skip a line. //Loop through the array with a "range for loop". for (const auto& d: a) { //d is each object in the array, not a copy d.print(); cout << "\n"; } return EXIT_SUCCESS; }