Write the program that have the class dataType

Download Category:

dateTypeCPP.zip - (5.28 MB)
[
dateTypeCPP/dateType.cpp
dateTypeCPP/dateTypeCPP.sdf
dateTypeCPP/dateTypeCPP.sln
dateTypeCPP/dateTypeCPP.suo
dateTypeCPP/dateTypeCPP.vcxproj
dateTypeCPP/dateTypeCPP.vcxproj.filters
dateTypeCPP/dateTypeCPP.vcxproj.user
dateTypeCPP/Debug/
dateTypeCPP/Debug/cl.command.1.tlog
dateTypeCPP/Debug/CL.read.1.tlog
dateTypeCPP/Debug/CL.write.1.tlog
dateTypeCPP/Debug/dateType.obj
dateTypeCPP/Debug/dateTypeCPP.exe
dateTypeCPP/Debug/dateTypeCPP.exe.embed.manifest
dateTypeCPP/Debug/dateTypeCPP.exe.embed.manifest.res
dateTypeCPP/Debug/dateTypeCPP.exe.intermediate.manifest
dateTypeCPP/Debug/dateTypeCPP.ilk
dateTypeCPP/Debug/dateTypeCPP.lastbuildstate
dateTypeCPP/Debug/dateTypeCPP.log
dateTypeCPP/Debug/dateTypeCPP.pdb
dateTypeCPP/Debug/dateTypeCPP_manifest.rc
dateTypeCPP/Debug/link.4704.read.1.tlog
dateTypeCPP/Debug/link.4704.write.1.tlog
dateTypeCPP/Debug/link.4704-cvtres.read.1.tlog
dateTypeCPP/Debug/link.4704-cvtres.write.1.tlog
dateTypeCPP/Debug/link.command.1.tlog
dateTypeCPP/Debug/link.read.1.tlog
dateTypeCPP/Debug/link.write.1.tlog
dateTypeCPP/Debug/link-cvtres.read.1.tlog
dateTypeCPP/Debug/link-cvtres.write.1.tlog
dateTypeCPP/Debug/mt.command.1.tlog
dateTypeCPP/Debug/mt.read.1.tlog
dateTypeCPP/Debug/mt.write.1.tlog
dateTypeCPP/Debug/rc.command.1.tlog
dateTypeCPP/Debug/rc.read.1.tlog
dateTypeCPP/Debug/rc.write.1.tlog
dateTypeCPP/Debug/vc100.idb
dateTypeCPP/Debug/vc100.pdb
dateTypeCPP/ipch/
dateTypeCPP/ipch/datetypecpp-2c7a4c34/
dateTypeCPP/ipch/datetypecpp-2c7a4c34/datetypecpp-8cc92cf.ipch
dateTypeCPP/Question.txt
dateTypeCPP/Screenshot_1.png
]

Write the program that have the class dataType to implement the date in the program. Write the definitions of the function setDate, and the constructor so that the values of the month, day, and year are checked before storing the data into the data members. Add a function member, isLeapYear, to check whether the year is a leap year. The class dataType can perform the following operations on a date:
a. Set the month.
b. Set the day.
c. Set the year.
d. Return the month.
e. Return the day.
f. Return the year.
g. Test whether the year is a leap year.
h. Return the number of the days in the month. For example, if the date is 3-12-2011, the number of the days to be returned is 31, because there are 31 days in March.
i. Return the number of the days passed in the year. For example, if the date is 3-18-2011, the number of the days passed in the year is 77. Note that the number of days returned also includes the current day.
j. Return the number of days remaining in the year. For example, if the date is 3-18-2011, the number of days remaining in the year is 288.
k. Calculate the new date by adding a fix number of days to the date. For example, if the date is 3-18-2011 and the days to be added are 25, the new date is 4-12-2011.

Write a Review

Get a fresh solution of this question. Ask it now to our experts.
doubt

Ask Your Question

We have verified professionals who are ready to answer your question.

time

Save Time and Money

We choose experts who can quickly answer your question and that suit your budget.

download

Get Your Answer

Your satisfaction is 100% guaranteed. You can keep on asking questions until you get the answer you need.