Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me solve it. help me, i dont know what I wrong . thanks Please do the following: 1. Design a class called Date.

please help me solve it. help me, i dont know what I wrong . thanks
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Please do the following: 1. Design a class called Date. The class should store a date in three integers: month, day, and year. There should be member functions to print the date in the following forms: 12/25/22 December 25,2022 25 December 2022 Demonstrate the class by writing a complete program implementing it. Input Validation: Do not accept values for the day greater than 31 or less than 1. Do not accept values for the month greater than 12 or less than 1 . Save the source code in file lab4. cpp Cake the all screenshot and save in to Microsoft word file name YourName-Lab4.doc and put above ode in Lab4Folder Project Build Debug Fortron wxSmith Took Toolst Plugins Doryelocks: Settings Help Start here x lab4.pp x Logs 8 others "rrer"mothifre"waehotdovaredinthilsvopet.erruk"eonshat,"wannotdeclaredinthilrocge.efroglronthirtewasnotdecthrouinthilceope the labi.ppp-Code-Blocles 20.03 File Edit View Serrch Project Build Debug Fortran wxSmith Took Toolst Plugins Doxyblocks Settings Heip? Manspenere Date:sDate(int theMonth, int theDay, int theyear) setMonth (theMonth) y setDay (theDay) ; setYear(theYear)? void Date:isetMonth (int thoMonth) if(theMonthe 1 if theMonth > 12) I coutsctheMonthcenia invalid month. The default month is 1. "ccendil month =17 1 else 1 month - theMonthz void DatezzsetDay(int theDay) if (theDay 31 ) couter theDayes"is invalid day. The default day in 1. "ccendl File L... Mousage -rrort 'monthilet' was not declarei in thin scopo wrruen 'aonthiler', was not declared in thin nocpe errer: "monthater' was hot declarnd in thin scope ecrurl 'manthittr' was bot desiazed in this ocise erriry 'monthiate' was hish declared in this mboge errect 'mapehele' vas not thelared in this octpe if (thebay of 1 in theDay >.11 ) ooutce theDayer"in invalid day. The defautt day is 1. "ccendir day =10 olne day - thepay vede Datermatrear (int theyear) ifItheyear theMonth: while (theMonth ol II theMonth > 12) i. couter"Invalid month! Enter the month (1 to 12):= aim > theMonthr cout - InEnter the day of the date: = ? logsE offiers locks 20.03 Search Project Build Oebug. Fortran wxsmith Jooks Toolst Plagins Daryblocks Settings Help 2cit2. II xE/P QSC Start bere labt cpp x logx cehress -7CodeablocksxSSearchresultsxPCocoxtbuildlogfBuldmetsagesxCppchedFilet.Massage

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

invest $ 2 0 0 0 for 1 0 years at 6 % compound annually

Answered: 1 week ago