te a program that will read several abbreviations given as std:string values until the value of "END" is given. After reading each previation, the program will check if the same abbreviation already exists in a data base. If not, it will add this new abbreviation to correct row of the data base. abbreviation data base will be composed of a 2D std:string array with 3 rows and 20 columns. Abbreviations starting with its will be kept in the first row, abbreviations starting with a lower case letter between 'a' and 'm' will be kept in the second and abbreviations starting with a lower case letter between 'n' and'z will be kept in the third row. er checking over all the input, the program will write the data base to the screen as seen in the examples below. TE: For each row there can be no more than 20 abbreviations, You do NOT need to check this in the input. TE: You MUST use a 20 String array to keep all the database in this question. NT: For checking if a given String exists in the data base, it would be a good idea to write a method like (doesExistinDB). Using ch a method will reduce a lot of code repetition. NT: You can check the first char of a string as if the string is a 10 char array (e.g, std:string s; s[0]). sql col 007 011 kar eng kitt zal kar 1 END bio bio MX 977 END Input cbr END

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Assignment
Write a program that will read several abbreviations given as std:string values until the value of "END" is given. After reading each
abbreviation, the program will check if the same abbreviation already exists in a data base. If not, it will add this new abbreviation to
the correct row of the data base.
The abbreviation data base will be composed of a 2D std:string array with 3 rows and 20 columns. Abbreviations starting with
digits will be kept in the first row, abbreviations starting with a lower case letter between 'a' and 'm' will be kept in the second
row, and abbreviations starting with a lower case letter between 'n' and 'z' will be kept in the third row.
After checking over all the input, the program will write the data base to the screen as seen in the examples below.
NOTE: For each row there can be no more than 20 abbreviations. You do NOT need to check this in the input.
NOTE: You MUST use a 20 String array to keep all the database in this question.
HINT: For checking if a given String exists in the data base, it would be a good idea to write a method like (doesExistinDB). Using
such a method will reduce a lot of code repetition.
HINT: You can check the first char of a string as if the string is a 10 char array (e.g., std:string s; s[0]).
sql col 007 011 kar eng kitt zal kar
cbr END
bio bio MX 977 END
Input
1 END
0-9: 007 011
0-9:1
0-9: 977
Output
a - m: col cbr
a- m: kar eng kitt a- m: bio
n-z: sql
n-2: zal
n-z:
Transcribed Image Text:Assignment Write a program that will read several abbreviations given as std:string values until the value of "END" is given. After reading each abbreviation, the program will check if the same abbreviation already exists in a data base. If not, it will add this new abbreviation to the correct row of the data base. The abbreviation data base will be composed of a 2D std:string array with 3 rows and 20 columns. Abbreviations starting with digits will be kept in the first row, abbreviations starting with a lower case letter between 'a' and 'm' will be kept in the second row, and abbreviations starting with a lower case letter between 'n' and 'z' will be kept in the third row. After checking over all the input, the program will write the data base to the screen as seen in the examples below. NOTE: For each row there can be no more than 20 abbreviations. You do NOT need to check this in the input. NOTE: You MUST use a 20 String array to keep all the database in this question. HINT: For checking if a given String exists in the data base, it would be a good idea to write a method like (doesExistinDB). Using such a method will reduce a lot of code repetition. HINT: You can check the first char of a string as if the string is a 10 char array (e.g., std:string s; s[0]). sql col 007 011 kar eng kitt zal kar cbr END bio bio MX 977 END Input 1 END 0-9: 007 011 0-9:1 0-9: 977 Output a - m: col cbr a- m: kar eng kitt a- m: bio n-z: sql n-2: zal n-z:
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY