![Data Structures and Algorithms in C++](https://www.bartleby.com/isbn_cover_images/9780470383278/9780470383278_largeCoverImage.gif)
Data Structures and Algorithms in C++
2nd Edition
ISBN: 9780470383278
Author: Michael T. Goodrich
Publisher: Wiley, John & Sons, Incorporated
expand_more
expand_more
format_list_bulleted
Question
Chapter 5, Problem 4P
EmployeeMap Class
Program Plan Intro
Program plan:
- Include the required header files.
- Use the “std” namespace.
- Create the class “Adapter_class”,
- Create the class variables.
- Define a function “insert()”.
- Push the item to the
vector . - Print the statement.
- Push the item to the
- Define a function “delete_item()”.
- Pop the item to the vector.
- Print the statement.
- Define a function “Find_Size()”.
- Print the size of the vector.
- Define a function “remove()”.
- Clear the vector.
- Define a function “Display()”.
- Push the item to the vector.
- Print the statement.
- Iterate a “for” loop.
- Print the elements of the vector.
- Define a function “main()”.
- Create the object of the class.
- Create the required integer variables.
- Iterate a “while” loop.
- Print the available options.
- Prompt the user to select the option.
- Scan for the value “option”.
- Define a “switch”.
- If the value of “option” is “1”.
-
- Prompt the user to enter the value to be inserted.
- Call the method “insert()”.
- Break the case.
- If the value of “option” is “2”.
-
- Print the statement.
- Call the method “insert()”.
- Break the case.
- If the value of “option” is “3”.
-
- Call the method “Find_Size()”.
- Break the case.
- If the value of “option” is “4”.
-
- Call the method “Display()”.
- Break the case.
- If the value of “option” is “5”.
-
- Call the method “Remove()”.
- Break the case.
- If the value of “option” is “6”.
-
- Call the method “exit()”.
- Break the case.
- Case default.
-
- Print the statement.
Expert Solution & Answer
![Check Mark](/static/check-mark.png)
Want to see the full answer?
Check out a sample textbook solution![Blurred answer](/static/blurred-answer.jpg)
Chapter 5 Solutions
Data Structures and Algorithms in C++
Knowledge Booster
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
![Text book image](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education