Question: [For C++ ] Write a toString() method that returns a string with the exact formatting: dd/mm/yyyy. For example, if your date object represents June 26
[For C++ ]
Write a toString() method that returns a string with the exact formatting: "dd/mm/yyyy". For example, if your date object represents June 26 1981, toString() would then return "26/06/1981". The returned string will always be exactly 10 characters long. The day will always be precisely two digits, the month will always be precisely two digits, and the year will always be precisely four digits. The two slashes separating the day, month, and year will be the last pieces in making the returned string precisely 10 characters long. Note: the toString() is a virtual const and has no arguments passed in (virtual string toString() const = 0). This question is Object Oriented Programming based but just need to figure out how to print the string in the corrected format.
Note 1: Cannot use
Note 2: Only #includes that can be used are
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
