This exercise has you analyze phone numbers.
You are asked to implement 2 features.
Phone numbers passed to the routines are guaranteed to be in the form NNN-NNN-NNNN e.g. 212-515-9876 and non-null.
Your analysis should return 3 pieces of data
Implement the (static) method PhoneNumber.Analyze() to produce the phone number info.
PhoneNumber.Analyze("631-555-1234");
// => (false, true, "1234")Implement the (static) method PhoneNumber.IsFake() to detect whether the phone number is fake using the phone number info produced in task 1.
PhoneNumber.IsFake(PhoneNumbers.Analyze("631-555-1234"));
// => trueThis exercise has you analyze phone numbers.
You are asked to implement 2 features.
Phone numbers passed to the routines are guaranteed to be in the form NNN-NNN-NNNN e.g. 212-515-9876 and non-null.
Your analysis should return 3 pieces of data
Implement the (static) method PhoneNumber.Analyze() to produce the phone number info.
PhoneNumber.Analyze("631-555-1234");
// => (false, true, "1234")Implement the (static) method PhoneNumber.IsFake() to detect whether the phone number is fake using the phone number info produced in task 1.
PhoneNumber.IsFake(PhoneNumbers.Analyze("631-555-1234"));
// => true