Write a test plan for the following branching structure. (Notethat the test for
ID: 3613088 • Letter: W
Question
Write a test plan for the following branching structure. (Notethat the test for leap year given here does not include the specialrules for century years.) if (month == 2 && day > 28) if (year%4 ! = 0) cout<< "Date error. Not a leap year." else if (day > 29) cout<< "Date error. Improper day for Feburary." Write a test plan for the following branching structure. (Notethat the test for leap year given here does not include the specialrules for century years.) if (month == 2 && day > 28) if (year%4 ! = 0) cout<< "Date error. Not a leap year." else if (day > 29) cout<< "Date error. Improper day for Feburary."Explanation / Answer
assuming you don't want to do the century years just need to check 4 dates in feburary 1)feb 29 a leapyear ex: 2/29/2004 2)feb 29 a non leapyear ex2/29/2003 3)feb 30 a leapyear ex 2/30/2000 4)feb 30 a non leapyear ex2/30/2003 to include century years if (month == 2 && day > 28) if (year%4 !=0||year%100==0&&year%400!=0) coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.