Question: Hands-on 4 INSTRUCTIONS This hands-on Assignment is worth a paints. The dropbox will be in the Week & module - but you should start working


Hands-on 4 INSTRUCTIONS This hands-on Assignment is worth a paints. The dropbox will be in the Week & module - but you should start working on it now. PREPARATION Be sure youve developed a BNF grammar that describes the language of phone numbers according to the practice anfitem. Let's call this the US phone number frommer One variation in how we write down US phone numbers is that we sometimes teve of the parentheses around the area code and instead use a dashahri 757-555-0000 for example Many businesses have dented the practice of usine** period) instead of dash between the number groups 757.555.0000 for example By convention, international telephone number begin with a plus entfolowed by a 1.2.org country code. The US country code is 150 the example US phone number would be written as +1757.355.0000 in this international style THE CHALLENGE 1. (5 pts) Write down a BNF grammar for US phone numbers that use the dash after the area code instead of parentheses around it 2. (pts) Write down a DNF grammar for US phone number written in the international style 3. (15 pts) Write a program that allows the user to input a character string from the keyboard, and tell the use of that string complies with the US phone number frommer that is the one from the Practice BNF tem like 1774530 Your program should output the users string, followed by "YES" if the string is acceptable, and "NO" If it is not so, an example output from this program could be (757)555-1234 YES 4. (pt) Your program must give the correctives/No) answer when presented with the following phone numbers 757-555-0025 (757)555-1234 75-555-0000 757.555.1234 757-043-1234 057-555-1234 057-MH5-1234 OPTIONAL: you get your program working and want to challenge yourself further, make the following change when the program outputs "NO" have it also output a reason why the string is unacceptable 1. We doen om het them 2. Wait 3.115 te were the orchestrated the core we phone number grammar as there from Pacte med sin fet NOVA.the (757555-123 YI mehr we were with the number 757-555-0025 (757)555.1234 75.555.0000 757.555.1234 757-04-1234 057-555-1234 057-MHS-1234 OPTIONAL you at your program worting to your future the following them ale output on why the new THE EVIDENCE For and you must INOLE WORD Gm to which you have your SOR you may non per LEONE of ramane paste the WORD document NOTEIl your biograde it to the ability before you Fant grand tou must . Bare for your best format. The best come to my A SINGLE LE Math All centrum Arendtion for the WARNING: unable to open or read your source code On MULTIPLE files instead of a SINGLE file containing your test runs, YOU WILL RECEIVE A ZERO for this entire hands on activity REMINDER The dropbox for the man will appear in week's module This Hands-on Assignment is worth 30 points. The dropbox will be in the Week 4 module -- but you should start working on it NOW. PREPARATION He sure you've developed a BNF grammar that describes the language of phone numbers according to the Practice BNF item. Let's call this the US phone number grommer One variation in how we write down US phone numbers is that we sometimes leave off the parentheses around the area code and instead use a dash after it 757-555-6000 for example.. Many businesses have adopted the practice of using " (period) instead of (dash between the number groups: 757.555.0000 for example, By convention, International telephone numbers begin with a plus sipr) followed by a 1, 2 or 3-digt country code. The US country code s "1". So the example US phone number would be written as +1787.555.0000 in this international style. THE CHALLENGE 1. (5 pts) Write down a BNF grammar for US phone numbers that use the dash after the area code instead of parentheses around it. 2. (5 pts) Write down a BNF grammar for US phone number written in the international style. 3. (15 pts) Write a program that allows the user to input a character string from the keyboard, and tell the user if that string complies with the US phone number grammar that is the one from the Practice BNF item, like (75785304601 Your program should output the user's sering, followed by "YES" if the string is acceptable, and "No if it is not. So, an example output from this program could be: (757) 555-1234 YES 4. (5 pts) Your program must give the correct (Yes/No) answer when presented with the following phone numbers: 757-555-0025 (757)555-1234 75-555-0000 757.555.1234 757-043-1234 057-555-1234 057-MH5-1234 OPTIONAL: if you get your program working and want to challenge yourself further, make the following change: When the program outputs 'NO' have it also output a reason why the string is unacceptable. THE EVIDENCE For #1 and you must submit 757.555.1234 757-043-1234 057-555-1234 057-MH5-1234 OPTIONAL: If you get your program working and want to challenge yourself further, make the following change: When the program outputs "NO" have it also output a reason why the string is unacceptable. THE EVIDENCE For #1 and 2, you must submit SINGLE WORD document into which you have typed your grammars -OR- you may write them LEGIBLY on paper, take LEGIBLE photos or scans of them, and paste those photos or scans into the WORD document, NOTE: I am unable to read your submission, I will not grade it, so please check the readability before you submit For 43 and 4 (program and test runa) you must submit Source code for your solution in a text format. That is, I must be able to copy/paste the code to run it myself A SINGLE FILE that shows ALL successful test runs. A screenshot is a good option for this. WARNING: I am unable to open or read your source code, OR - you submit MULTIPLE files instead of a SINGLE file containing your test runs, YOU WILL RECEIVE A ZERO for this entire hands-on activity. REMINDER: The dropbox for this assignment will appear in next week's module. Hands-on 4 INSTRUCTIONS This hands-on Assignment is worth a paints. The dropbox will be in the Week & module - but you should start working on it now. PREPARATION Be sure youve developed a BNF grammar that describes the language of phone numbers according to the practice anfitem. Let's call this the US phone number frommer One variation in how we write down US phone numbers is that we sometimes teve of the parentheses around the area code and instead use a dashahri 757-555-0000 for example Many businesses have dented the practice of usine** period) instead of dash between the number groups 757.555.0000 for example By convention, international telephone number begin with a plus entfolowed by a 1.2.org country code. The US country code is 150 the example US phone number would be written as +1757.355.0000 in this international style THE CHALLENGE 1. (5 pts) Write down a BNF grammar for US phone numbers that use the dash after the area code instead of parentheses around it 2. (pts) Write down a DNF grammar for US phone number written in the international style 3. (15 pts) Write a program that allows the user to input a character string from the keyboard, and tell the use of that string complies with the US phone number frommer that is the one from the Practice BNF tem like 1774530 Your program should output the users string, followed by "YES" if the string is acceptable, and "NO" If it is not so, an example output from this program could be (757)555-1234 YES 4. (pt) Your program must give the correctives/No) answer when presented with the following phone numbers 757-555-0025 (757)555-1234 75-555-0000 757.555.1234 757-043-1234 057-555-1234 057-MH5-1234 OPTIONAL: you get your program working and want to challenge yourself further, make the following change when the program outputs "NO" have it also output a reason why the string is unacceptable 1. We doen om het them 2. Wait 3.115 te were the orchestrated the core we phone number grammar as there from Pacte med sin fet NOVA.the (757555-123 YI mehr we were with the number 757-555-0025 (757)555.1234 75.555.0000 757.555.1234 757-04-1234 057-555-1234 057-MHS-1234 OPTIONAL you at your program worting to your future the following them ale output on why the new THE EVIDENCE For and you must INOLE WORD Gm to which you have your SOR you may non per LEONE of ramane paste the WORD document NOTEIl your biograde it to the ability before you Fant grand tou must . Bare for your best format. The best come to my A SINGLE LE Math All centrum Arendtion for the WARNING: unable to open or read your source code On MULTIPLE files instead of a SINGLE file containing your test runs, YOU WILL RECEIVE A ZERO for this entire hands on activity REMINDER The dropbox for the man will appear in week's module This Hands-on Assignment is worth 30 points. The dropbox will be in the Week 4 module -- but you should start working on it NOW. PREPARATION He sure you've developed a BNF grammar that describes the language of phone numbers according to the Practice BNF item. Let's call this the US phone number grommer One variation in how we write down US phone numbers is that we sometimes leave off the parentheses around the area code and instead use a dash after it 757-555-6000 for example.. Many businesses have adopted the practice of using " (period) instead of (dash between the number groups: 757.555.0000 for example, By convention, International telephone numbers begin with a plus sipr) followed by a 1, 2 or 3-digt country code. The US country code s "1". So the example US phone number would be written as +1787.555.0000 in this international style. THE CHALLENGE 1. (5 pts) Write down a BNF grammar for US phone numbers that use the dash after the area code instead of parentheses around it. 2. (5 pts) Write down a BNF grammar for US phone number written in the international style. 3. (15 pts) Write a program that allows the user to input a character string from the keyboard, and tell the user if that string complies with the US phone number grammar that is the one from the Practice BNF item, like (75785304601 Your program should output the user's sering, followed by "YES" if the string is acceptable, and "No if it is not. So, an example output from this program could be: (757) 555-1234 YES 4. (5 pts) Your program must give the correct (Yes/No) answer when presented with the following phone numbers: 757-555-0025 (757)555-1234 75-555-0000 757.555.1234 757-043-1234 057-555-1234 057-MH5-1234 OPTIONAL: if you get your program working and want to challenge yourself further, make the following change: When the program outputs 'NO' have it also output a reason why the string is unacceptable. THE EVIDENCE For #1 and you must submit 757.555.1234 757-043-1234 057-555-1234 057-MH5-1234 OPTIONAL: If you get your program working and want to challenge yourself further, make the following change: When the program outputs "NO" have it also output a reason why the string is unacceptable. THE EVIDENCE For #1 and 2, you must submit SINGLE WORD document into which you have typed your grammars -OR- you may write them LEGIBLY on paper, take LEGIBLE photos or scans of them, and paste those photos or scans into the WORD document, NOTE: I am unable to read your submission, I will not grade it, so please check the readability before you submit For 43 and 4 (program and test runa) you must submit Source code for your solution in a text format. That is, I must be able to copy/paste the code to run it myself A SINGLE FILE that shows ALL successful test runs. A screenshot is a good option for this. WARNING: I am unable to open or read your source code, OR - you submit MULTIPLE files instead of a SINGLE file containing your test runs, YOU WILL RECEIVE A ZERO for this entire hands-on activity. REMINDER: The dropbox for this assignment will appear in next week's module
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
