When a function is declared as virtual and when a class ? Please explain with examples.
Given a Calendar class (there are three fields, year, month, day) and a number of N, Implement a function that returns the calendar after N days.
Example: Input: {2017, 3,20} and 12, Output: {2017,4, 1}
While doing design for a software, what things enforce to use template classes and template functions ? Is it consider best practices or not ?