In Programming Exercise 2, the class dateType was designed and implemented to keep track of a date, but it has very limited operations. Redefine the class dateType so that it can perform the following...

I need the answer as soon as possibleIn Programming Exercise 2, the class dateType was designed and<br>implemented to keep track of a date, but it has very limited operations.<br>Redefine the class dateType so that it can perform the following opera-<br>tions on a date, in addition to the operations already defined:<br>6.<br>1<br>a. Set the month.<br>b.<br>Set the day.<br>Set the year.<br>Solve 6&7 with c++<br>C.<br>Return the month.please<br>d.<br>Return the day.<br>Return the year.<br>е.<br>f.<br>g.<br>Test whether the year is a leap year.<br>Return the number of days in the month. For example, if the date is<br>3-12-2019, the number of days to be returned is 31 because there are<br>31 days in March.<br>h.<br>814 | Chapter 11: Inheritance and Composition<br>Return the number of days passed in the year. For example, if the date<br>is 3-18-2019, the number of days passed in the year is 77. Note that<br>the number of days returned also includes the current day.<br>i Return the number of days remaining in the year. For example, if the<br>date is 3-18-2019, the number of days remaining in the year is 288.<br>i.<br>k. Calculate the new date by adding a fixed number of days to the date.<br>For example, if the date is 3-18-2019 and the days to be added are 25,<br>the new date is 4-12-2019.<br>Write the definitions of the functions to implement the operations<br>defined for the class dateType in Programming Exercise 6.<br>7.<br>

Extracted text: In Programming Exercise 2, the class dateType was designed and implemented to keep track of a date, but it has very limited operations. Redefine the class dateType so that it can perform the following opera- tions on a date, in addition to the operations already defined: 6. 1 a. Set the month. b. Set the day. Set the year. Solve 6&7 with c++ C. Return the month.please d. Return the day. Return the year. е. f. g. Test whether the year is a leap year. Return the number of days in the month. For example, if the date is 3-12-2019, the number of days to be returned is 31 because there are 31 days in March. h. 814 | Chapter 11: Inheritance and Composition Return the number of days passed in the year. For example, if the date is 3-18-2019, the number of days passed in the year is 77. Note that the number of days returned also includes the current day. i Return the number of days remaining in the year. For example, if the date is 3-18-2019, the number of days remaining in the year is 288. i. k. Calculate the new date by adding a fixed number of days to the date. For example, if the date is 3-18-2019 and the days to be added are 25, the new date is 4-12-2019. Write the definitions of the functions to implement the operations defined for the class dateType in Programming Exercise 6. 7.

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here