C++ How to Program (10th Edition)
C++ How to Program (10th Edition)
10th Edition
ISBN: 9780134448237
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
Question
Book Icon
Chapter 9, Problem 9.8E
Program Plan Intro

Program Plan:

  • Include the required header files.
  • Create class Date.
  • The class definition will contain prototypes for member function Date like setDate.
  • The private integer members month, day and year.
  • A member function nextDay is included to increment the day by one.

Program Description:

/*Program that tests function nextDay in a loop which prints the date during each iteration.*/

Date class declaration

Here, the class is Date which declares the functions setDate()and nextDay().

Blurred answer
Students have asked these similar questions
What’s the output of the following programs?
What is the output of following code.
What is the output of the following code segment?