In: Operations Management
1. Define a regular expression for validating each of the following:
a. A U.S. zip code, which must have five digits, followed by an optional hyphen and four digits.
b. A telephone number in the format (aaa) nnn-nnnn, where aaa represents the area code and the ns represent digits.
c. A date in the form of day-month-year, where the month is a three-letter code and the year is four digits. A hyphen must separate the day and month and year and month.
2. For the following codes, define the validation criteria (there may be multiple checks for each field) and the order in which you would test each of the conditions.
a. A credit card number entered on a Web form: The customer has selected the type of credit card from a drop-down list.
b. A part number in a hardware store: The part number is a complex code, where the first digit represents the department (such as housewares, automotive, and so on), and the number should be self-checking. There are seven different departments.
c. The date that a book was postmarked when returned to an online bookstore: A copy of the customer receipt must be included with the book. Returned books must be postmarked within 30 days of the purchase date.
d. A language spoken code used on a website: Hint: Search the Web for standard language codes.
e. The Canadian postal code: The format is X9X 9X9 (X is any letter, 9 is any number).
f. Airport codes: Such as LAX for Los Angeles or DUB for Dublin.
*****Please please please LIKE THIS ANSWER, so that I can get a small benefit, Please*****
Define a regular expression for validating each of the following:
a. A U.S. zip code, which must have five digits,
followed by an optional hyphen and four digits.
b. A telephone number in the format (aaa) nnn-nnnn, where aaa
represents the area code and the ns represent
digits.
c. A date in the form of day-month-year, where the month is a
three-letter code and the year is four digits. A hyphen must
separate the day and month and year and month.
a. Regular Expression for US zip code, which has 5 digits followed by an optional hyphen and 4 digits, is as follows:-
b. Expression for a telephone number in the format (aaa) nnn-nnnn is a s follows:-
c. Expression for date in day-month-year format where the month is three letter code and year is four digits separated by hyphen is as follows:-
For the following codes, define the validation criteria (there may be multiple checks for each field) and the order in which you would test each of the conditions.
a. A credit card number entered on a Web form: The
customer has selected the type of credit card from a drop-down
list.
b. A part number in a hardware store: The part number is a complex
code, where the first digit represents the department (such as
housewares, automotive, and so on), and the number should be
self-checking. There are seven different departments.
c. The date that a book was postmarked when returned to an online
bookstore: A copy of the customer receipt must be included with the
book. Returned books must be postmarked within 30 days of the
purchase date.
d. A language spoken code used on a website: Hint: Search
the Web for standard language codes.
e. The Canadian postal code: The format is X9X 9X9 (X is any
letter, 9 is any number).
f. Airport codes: Such as LAX for Los Angeles or DUB for
Dublin.
a. The validation criteria for a credit card number entered on a web form are by using Luhn formula. The first check when a credit card number is entered is the length of the number; next test is to match the credit card company and bank to verify that it is actually a card issued by that company.
b. Validation criteria for a part number in a hardware store can be setting up self-validating codes (Check digits). The Check digits helps to detect single digit miss key or transposition errors.
c. Store the date as part of code used to identify the book. When the book will be returned the range validity test can be done to ensure that the book is returned within the given time range.
d. Validation for a language spoken code used on a website can be validated by comparing them to document type definition. It will check to see whether the format of the document is valid.
e. Validation criteria for Canadian postal code of format X9X9X9 can best test for class or composition which checks to see that the data fields are compose of letters or digits. Also test for valid values can be done which checks input for invalid works if there are only a few valid values.
f. Validation criteria for Airport codes can be test for class or composition using a composition test the program should not accept any flight code that includes both letters and numbers GUI screens will help in these kinds of entries without error.
*****Please please please LIKE THIS ANSWER, so that I can get a small benefit, Please*****