NextDateExample - This example was borrowed from “How We...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: This example was borrowed from “How We Test Software at Microsoft” (Microsoft Press) “Next Date” program. Three Input Fields: Month, Day, Year Two Buttons: “Next Date”, “Close” Works only on dates after the Gregorian calendar was adopted on 10/15/1582 Leap Year Refresher Year X is a leap year if either: 1) (X % 4 == 0) && (X % 100 != 0) 2) X % 400 == 0 Equivalence Classes Month V1 V2 V3 I1 I2 I3 I4 I5 30 day months 31 day months February >= 13 <= 0 Any non‐integer Empty >= 3 integers Day V4 V5 V6 V7 I6 I7 I8 I9 I10 1 – 28 (all months have these days) 29 (some months have this day, some don’t) 30 (ditto) 31 (ditto) >= 32 <= 0 Any non‐integer Empty >= 3 integers Year V8 V9 V10 V11 I11 I12 I13 I14 I15 Non‐leap year Leap year Century non‐leap year Century leap year <= 1581 >= 3001 Any non‐integer Empty >= 5 integers ...
View Full Document

This note was uploaded on 03/02/2012 for the course C S 340 taught by Professor Woodfield,s during the Winter '08 term at BYU.

Ask a homework question - tutors are online