Question: W8 - Calendar Tool with Automated Testing C++ Background: The Gregorian calendar (the one we use) consists of the following 12 months (https://www.timeanddate.com/calendar/months/): January -

W8 - Calendar Tool with Automated Testing C++

Background:

The Gregorian calendar (the one we use) consists of the following 12 months (https://www.timeanddate.com/calendar/months/):

January - 31 days February - 28 days in a common year and 29 days in leap years March - 31 days April - 30 days May - 31 days June - 30 days July - 31 days August - 31 days September - 30 days October - 31 days November - 30 days December - 31 days

Determining if a year is a leap year is based on the following criteria ( https://www.timeanddate.com/date/leapyear.html):

The year must be evenly divisible by 4; If the year can also be evenly divided by 100, it is not a leap year; unless... the year is also evenly divisible by 400. Then it is a leap year. According to these rules, the years 2000 and 2400 are leap years, while 1800, 1900, 2100, 2200, 2300, and 2500 are not leap years.

Problem:

Repeatedly prompt a user to enter a year and month, output to the user the number of days in that month.

You must break up the problem into functions, for example, there should be at least one function to take user input, one function to determine if a users input is valid, one function to calculate the number of days in a month and one function to determine if a year is a leap year. That is a minimum of 4 functions. There should be very little code in main, all main does is call the function to take the users input.

Every function, except for ones that require user input, must be fully tested with one or more automated or self-guided test functions.You will be graded on the completeness of your automated tests or self-guided tests.

If you don't use Qt or Visual Studio and can't figure out automated testing for your IDE, add at least ten drivers that test each one of your functions for various values. Each function should have a least one test which shows how the function does at the edges of possible good data values. Include information regarding these ten tests and the values your driver used at the end of your program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!