Question

10. AU.S. phone number consists of three sections: (1) Area code (null or three digits); (2) prefix code (three digits); and

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer :

a. Area code test :

START ACCEPT yes 15 The seld TULL No SF MY REJECT Digit number Hes Another Digit? Ho Tyes 2nd No Digittemberg Tyes Another Mo

Above flowchart can be used to determine whether the given area code is valid or not.

Test Cases :

Following are Valid area codes :

1. Null

2. 123

3. 111

Following are Invalid area codes :

1. a12

2. 1#2

3. 3#a

4. abc#

b. Prefix code test :

the field rule Y REJECT START yes the test Digit orfor Chcroder (No Another Ho Digila yes Digit Tomke lyes Thother Ho Pigit?

Above flowchart can be used to determine whether the given prefix code is valid or not.

Test Cases :

Following are Valid prefix codes :

1. 234

2. 223

3. 222

Following are Invalid prefix codes :

1. 023

2. 123

3. 23a

4. #34

5. a#5

c. Postfix code test :

START s yes REJECT the field TEULL ist fo Digit from Iyes Mo An thes Digit Jies Ind Ho Digit Trung eyes Trother Righ Les Rigi

Above flowchart can be used to determine whether the given postfix code is valid or not.

Test Cases :

Following are Valid postfix codes :

1. 1234

2. 1123

3. 1112

4. 1111

5.1231

Following are Invalid postfix codes :

1. a123

2. 1#23

3. a#24

4. aaaa

5. a#a#

Add a comment
Know the answer?
Add Answer to:
10. AU.S. phone number consists of three sections: (1) Area code (null or three digits); (2)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • This is Python The program should accept input from the user as either 7-digit phone number...

    This is Python The program should accept input from the user as either 7-digit phone number or 10-digit. If the user enters 7 characters, the program should automatically add "512" to the beginning of the phone number as the default area code. Dash (hyphen) characters do not count in input character count, but must not be random. If the user enters dashes the total character count must not exceed 12. The program should not crash if the user enters invalid...

  • please write psedocodes for all of the questions and an algorithm for 2. no coding is...

    please write psedocodes for all of the questions and an algorithm for 2. no coding is required . FIUJELI 95 PIOL 1. (Geometry: Area of a Pentagon) Write a C# program that prompts the user to enter the length from the center of a pentagon to a vertex and computes the area of the pentagon, as shown in the following figure. The formula for computing the area of a pentagon is Area = 2 , where s is the length...

  • Given java code is below, please use it! import java.util.Scanner; public class LA2a {      ...

    Given java code is below, please use it! import java.util.Scanner; public class LA2a {       /**    * Number of digits in a valid value sequence    */    public static final int SEQ_DIGITS = 10;       /**    * Error for an invalid sequence    * (not correct number of characters    * or not made only of digits)    */    public static final String ERR_SEQ = "Invalid sequence";       /**    * Error for...

  • 1. The access code for a car's security system consists of four digits. be zero and...

    1. The access code for a car's security system consists of four digits. be zero and the last digit must be even. How many different codes are consists of four digits. The first digit cannot many different codes are available? 2. Decide whether each object is a permutation or a combination a) a telephone number b) a social security number c) a hand of cards in poker d) a committee of politicians e) the "combination" on a student gym locker...

  • PLEASE HURRY Software Testing Don't make any changes to the provided code. Please write a test...

    PLEASE HURRY Software Testing Don't make any changes to the provided code. Please write a test case for the below prompt using the provided java programs Use the setString() function in MyCustomStringInterface to set the value to “Peter Piper picked a peck of pickled peppers.”. Then test to see if reverseNCharacters() function returns the reversed string when the characters are reversed in groups of 4 and padding is disabled (in this case, “etePiP r repkcipa decep fo kcip delkpep srep.”)....

  • 6174 is known as Kaprekar's constant after the Indian mathematician D. R. Kaprekar. This number is...

    6174 is known as Kaprekar's constant after the Indian mathematician D. R. Kaprekar. This number is notable for the following rule: 1. Take any four-digit number, using at least two different digits. 2. Arrange the digits in descending and then in ascending order to get two four-digit numbers, adding leading zeros if necessary. 3. Subtract the smaller number from the bigger number. 4. Go back to step 2 and repeat. The above process, known as Kaprekar's routine, will always reach...

  • This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation...

    This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation inside a class. Task One common limitation of programming languages is that the built-in types are limited to smaller finite ranges of storage. For instance, the built-in int type in C++ is 4 bytes in most systems today, allowing for about 4 billion different numbers. The regular int splits this range between positive and negative numbers, but even an unsigned int (assuming 4 bytes)...

  • could you please help me with this problem, also I need a little text so I...

    could you please help me with this problem, also I need a little text so I can understand how you solved the problem? import java.io.File; import java.util.Scanner; /** * This program lists the files in a directory specified by * the user. The user is asked to type in a directory name. * If the name entered by the user is not a directory, a * message is printed and the program ends. */ public class DirectoryList { public static...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT