Case1: Write a menu driven program that allows you to visit cities of oman in random order with following options. 1: Visit a city2: Go to previous city3: Quit the program When user presses 1: program asks user to enter the city name, and then display that the city has been visited. Please note user can visit a city any number of times When user presses 2: Program takes you back to the previous city When user presses 3: Program terminates See the below example how program interacts with the user: C:> 1: Visit a city2: Go to previous city3: Quit the program Enter your choice … 1 Please enter a city to visit.. Muscat You are in Muscat now… Enter your choice... 1: Visit a city2: Go to previous city3: Quit the program 1 Please enter a city to visit.. Ibra You are in Ibra now… Enter your choice... 1: Visit a city2: Go to previous city3: Quit the program 1 Please enter a city to visit.. Sohar You are in Sohar now… Enter your choice... 1: Visit a city2: Go to previous city3: Quit the program 2 You are in Ibra now… Enter your choice... 1: Visit a city2: Go to previous city3: Quit the program 1 Please enter a city to visit.. Nizwa You are in Nizwa now… Enter your choice... 1: Visit a cit
Case1: Write a menu driven program that allows you to visit cities of oman in random order with following options. 1: Visit a city2: Go to previous city3: Quit the program When user presses 1: program asks user to enter the city name, and then display that the city has been visited. Please note user can visit a city any number of times When user presses 2: Program takes you back to the previous city When user presses 3: Program terminates See the below example how program interacts with the user: C:> 1: Visit a city2: Go to previous city3: Quit the program Enter your choice … 1 Please enter a city to visit.. Muscat You are in Muscat now… Enter your choice... 1: Visit a city2: Go to previous city3: Quit the program 1 Please enter a city to visit.. Ibra You are in Ibra now… Enter your choice... 1: Visit a city2: Go to previous city3: Quit the program 1 Please enter a city to visit.. Sohar You are in Sohar now… Enter your choice... 1: Visit a city2: Go to previous city3: Quit the program 2 You are in Ibra now… Enter your choice... 1: Visit a city2: Go to previous city3: Quit the program 1 Please enter a city to visit.. Nizwa You are in Nizwa now… Enter your choice... 1: Visit a cit
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...
Related questions
Question
Case1: Write a menu driven program that allows you to visit cities of oman in random order with following options.
1: Visit a city
2: Go to previous city
3: Quit the program
When user presses 1: program asks user to enter the city name, and then display that the city has been visited. Please note user can visit a city any number of times
When user presses 2: Program takes you back to the previous city
When user presses 3: Program terminates
See the below example how program interacts with the user:
C:> 1: Visit a city2: Go to previous city3: Quit the program
Enter your choice …
1
Please enter a city to visit..
Muscat
You are in Muscat now…
Enter your choice...
1: Visit a city2: Go to previous city3: Quit the program
1
Please enter a city to visit..
Ibra
You are in Ibra now…
Enter your choice...
1: Visit a city2: Go to previous city3: Quit the program
1
Please enter a city to visit..
Sohar
You are in Sohar now…
Enter your choice...
1: Visit a city2: Go to previous city3: Quit the program
2
You are in Ibra now…
Enter your choice...
1: Visit a city2: Go to previous city3: Quit the program
1
Please enter a city to visit..
Nizwa
You are in Nizwa now…
Enter your choice...
1: Visit a city2: Go to previous city3: Quit the program
2
You are in Ibra now…
Enter your choice...
1: Visit a city2: Go to previous city3: Quit the program
2
You are in Muscat now…
Enter your choice...
1: Visit a city2: Go to previous city3: Quit the program
2
You are back to your original place…
Enter your choice...
1: Visit a city2: Go to previous city3: Quit the program
3
Program terminates…
Case2: A company in Oman must maintain a huge database of its customers. The maintenance process requires frequent searches, addition, and deletion of the customers. Using an array of size 100 develop a program to store the customers phone numbers. The program displays a menu as below-
1: Add a customer 2: Delete a customer3: Search a customer
4: Display all in the ascending orders5: Display all in the descending orders 6: Quit
For The ‘search’ and ‘delete’ functionality If the phone number does not exit then program should report that cutomer is not found in the database. While writng the program follow the instructions below-
a) For Searching use Binary search
b) For sorting in the ascending order use Selection sort
c) For sorting in the descending order use Quick sort
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 5 steps with 2 images
Recommended textbooks for you
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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
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
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY