The class dateType defined in Programming Exercise 6 prints the date in numerical form. Some applications might require the date to be printed in another form, such as March 24, 2019. Derive the class extDateType so that the date can be printed in either form. Add a member variable to the class extDateType so that the month can also be stored in string form. Add a member function to output the month in the string format, followed by the year-for example, in the form March 2019. Write the definitions of the functions to implement the operations for the class extDateType. Using the classes extDateType (Programming Exercise 8) and dayType (Chapter 10, Programming Exercise 5), design the class calendarType so that, given the month and the year, we can print the calendar for that month. To print a monthly calendar, you must know the first day of the month and the number of days in that month. Thus, you must store the first day of the month, which is of the form dayType, and the month and the year of the calendar. Clearly, the month and the year can be stored in an object of the form extDateType by setting the day component of the date to 1 and the month and year as specified by the user. Thus, the class calendarType has two member variables: an object of the type dayType and an object of the type extDateType. Design the class calendarType so that the program can print a calendar for any month starting January 1, 1500. Note that the day for January 1 of the year 1500 is a Monday. To calculate the first day of a month, you can add the appropriate days to Monday of January 1, 1500. For the class calendarType, include the following operations: a. Determine the first day of the month for which the calendar will be printed. Call this operation firstDayofMonth. b. Set the month. . Set the year. Solve them with C++ please Programming Exercises I d. Return the month. e Return the year. E Print the calendar for the particular month. 9. Add the appropriate constructors to initialize the member variables.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 8PE
icon
Related questions
Question
I need the answer as soon as possible
40% D 9:50
The class dateType defined in Programming Exercise 6 prints the date
in numerical form. Some applications might require the date to be printed
in another form, such as March 24, 2019. Derive the class extDateType
so that the date can be printed in either form.
Add a member variable to the class extDateType so that the month
can also be stored in string form. Add a member function to output the
month in the string format, followed by the year-for example, in the
form March 2019.
Write the definitions of the functions to implement the operations for
the class extDateType.
Using the classes extDateType (Programming Exercise 8) and dayType
(Chapter 10, Programming Exercise 5), design the class calendarType
so that, given the month and the year, we can print the calendar for that
month. To print a monthly calendar, you must know the first day of the
month and the number of days in that month. Thus, you must store the
first day of the month, which is of the form dayType, and the month and
the year of the calendar. Clearly, the month and the year can be stored
in an object of the form extDateType by setting the day component of
the date to 1 and the month and year as specified by the user. Thus, the
class calendarType has two member variables: an object of the type
dayType and an object of the type extDateType.
Design the class calendarType so that the program can print a calendar
for any month starting January 1, 1500. Note that the day for January 1 of
the year 1500 is a Monday. To calculate the first day of a month, you can
add the appropriate days to Monday of January 1, 1500.
For the class calendarType, include the following operations:
Determine the first day of the month for which the calendar will be
printed. Call this operation firstDayofMonth.
b. Set the month.
a.
Set the year.
Solve them with C++ please
C.
Programming Exercises | 815
d.
Return the month.
Return the year.
e.
f. Print the calendar for the particular month.
g.
Add the appropriate constructors to initialize the member variables.
Transcribed Image Text:40% D 9:50 The class dateType defined in Programming Exercise 6 prints the date in numerical form. Some applications might require the date to be printed in another form, such as March 24, 2019. Derive the class extDateType so that the date can be printed in either form. Add a member variable to the class extDateType so that the month can also be stored in string form. Add a member function to output the month in the string format, followed by the year-for example, in the form March 2019. Write the definitions of the functions to implement the operations for the class extDateType. Using the classes extDateType (Programming Exercise 8) and dayType (Chapter 10, Programming Exercise 5), design the class calendarType so that, given the month and the year, we can print the calendar for that month. To print a monthly calendar, you must know the first day of the month and the number of days in that month. Thus, you must store the first day of the month, which is of the form dayType, and the month and the year of the calendar. Clearly, the month and the year can be stored in an object of the form extDateType by setting the day component of the date to 1 and the month and year as specified by the user. Thus, the class calendarType has two member variables: an object of the type dayType and an object of the type extDateType. Design the class calendarType so that the program can print a calendar for any month starting January 1, 1500. Note that the day for January 1 of the year 1500 is a Monday. To calculate the first day of a month, you can add the appropriate days to Monday of January 1, 1500. For the class calendarType, include the following operations: Determine the first day of the month for which the calendar will be printed. Call this operation firstDayofMonth. b. Set the month. a. Set the year. Solve them with C++ please C. Programming Exercises | 815 d. Return the month. Return the year. e. f. Print the calendar for the particular month. g. Add the appropriate constructors to initialize the member variables.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 1 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning