November 2024
Intermediate to advanced
300 pages
7h 12m
English
Given the preceding definition of unit, does the following concept conform?
One practical scenario involving that concept is validating data in a (simplistic) flight booking. Booking data includes passenger name, departure date, age, and a list of airports representing an itinerary. The passenger name is required, the date must be later than right now, the age must be at least 18 (the airline disallows unaccompanied minors for a single-person booking), the itinerary must contain at least two airport codes (for example, DEN and PRG), and each of those airport codes must be valid.
To gather errors for these five requirements, the code must ...
Read now
Unlock full access