“PLEASE USE C++ IDE” 1. construct a program that will utilize the first two (2) operations of Linked List mentioned above. Your program must do the following: 1. It must be a menu-driven program with the following choices: [A] Add Pet Name [B] Display Pet Name [C] Reverse Display [D] Delete [E] Exit SAMPLE OUTPUT: MENU [A] Add Pet Name [B] Display Pet Name IC] Reverse Display [D Delete [E] Exit Enter choice: 2. For option [A], the data that the user should add in the linked list are Pet Names. You have an option to use a string or a char data type. No whitespaces are needed since only one word is used for the pet names. The program will continuously ask the user to enter pet names until letter “X” is entered. SAMPLE OUTPUT: MENU A] Add Pet Name [B) Display Pet Name [C] Reverse Display [D] Delete (E) Exit Enter choice: A Enter X to end Enter pet name to be added in the list: Brownie Enter X to end Enter pet name to be added in the list: Kitty Enter X to end Enter pet name to be added in the 1ist: x MENU [A] Add Pet Name (B) Display Pet Name [C] Reverse Display [D] Delete (E) Exit Enter choice : 3. For option [B], check if Linked List is empty. If it is empty, then display “NULL”. Otherwise, print the content of the Linked List. SAMPLE OUTPUT MENU [A] Add Pet Name [B] Display Pet Name |[C] Reverse Display [D] Delete (E] Exit Enter choice: B Brownie Kitty 4. For option [C], check if Linked List is empty. If it is empty, then display “NULL”. Otherwise, print the content of the Linked List in a reverse manner. SAMPLE OUTPUT MENU [A] Add Pet Name [B] Display Pet Name [C] Reverse Display (DI Delete [E] Exit Enter choice: C Kitty Brownie 5. For option [D], it must delete the data in the head node. SAMPLE OUTPUT MENU [A] Add Pet Name (B] Display Pet Name tC] Reverse Display [DI Delete (E) Exit Enter choice : D The head node was deleted. MENU [A] Add Pet Name [B] Display Pet Name (C] Reverse Display (D] Delete (E) Exit Enter choice: B Kitty 6. For option [E], exit the program. SAMPLE OUTPUT MENU [A] Add Pet Name [B] Display Pet Name TC Reverse Display [D] Delete [E] Exit Enter choice: E ------------------------------------------------ process exited after 292.5 seconds with return value 0 press any key to continue………...

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
100%

“PLEASE USE C++ IDE”


1. construct a program that will utilize the first two (2)
operations of Linked List mentioned above. Your program must do
the following:


1. It must be a menu-driven program with the following choices:
[A] Add Pet Name
[B] Display Pet Name
[C] Reverse Display
[D] Delete
[E] Exit


SAMPLE OUTPUT:


MENU
[A] Add Pet Name
[B] Display Pet Name
IC] Reverse Display
[D Delete
[E] Exit
Enter choice:


2. For option [A], the data that the user should add in the linked
list are Pet Names. You have an option to use a string or a
char data type. No whitespaces are needed since only one word
is used for the pet names. The program will continuously ask
the user to enter pet names until letter “X” is entered.


SAMPLE OUTPUT:


MENU
A] Add Pet Name
[B) Display Pet Name
[C] Reverse Display
[D] Delete
(E) Exit

Enter choice: A


Enter X to end
Enter pet name to be added in the list: Brownie


Enter X to end
Enter pet name to be added in the list: Kitty


Enter X to end
Enter pet name to be added in the 1ist: x


MENU
[A] Add Pet Name
(B) Display Pet Name
[C] Reverse Display
[D] Delete
(E) Exit
Enter choice :


3. For option [B], check if Linked List is empty. If it is empty,
then display “NULL”. Otherwise, print the content of the Linked
List.


SAMPLE OUTPUT


MENU
[A] Add Pet Name
[B] Display Pet Name
|[C] Reverse Display
[D] Delete
(E] Exit
Enter choice: B


Brownie Kitty


4. For option [C], check if Linked List is empty. If it is empty,
then display “NULL”. Otherwise, print the content of the Linked
List in a reverse manner.


SAMPLE OUTPUT


MENU
[A] Add Pet Name
[B] Display Pet Name
[C] Reverse Display
(DI Delete
[E] Exit
Enter choice: C


Kitty Brownie


5. For option [D], it must delete the data in the head node.


SAMPLE OUTPUT


MENU
[A] Add Pet Name
(B] Display Pet Name
tC] Reverse Display
[DI Delete
(E) Exit
Enter choice : D


The head node was deleted.


MENU
[A] Add Pet Name
[B] Display Pet Name
(C] Reverse Display
(D] Delete
(E) Exit
Enter choice: B


Kitty


6. For option [E], exit the program.


SAMPLE OUTPUT
MENU
[A] Add Pet Name
[B] Display Pet Name
TC Reverse Display
[D] Delete
[E] Exit
Enter choice: E
------------------------------------------------
process exited after 292.5 seconds with return value 0
press any key to continue………...

Expert Solution
steps

Step by step

Solved in 2 steps with 2 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