You will need to develop a command line menu driven program that does the following
. • Printing and Working of the Menu:
** Welcome to the Array Functions **

  1. Enter e to Enter an English word
  2. Enter p to print the already entered English word
  3. Enter I to enter another word for insertion into FirstWord
  4. Enter d to delete characters from FirstWord
  5. Enter R to Right shift characters of FirstWord
  6. Enter L to Left shift characters of FirstWord
    Please enter one of the choices above or q to exit:

Details of Menus Option

  1. For Option e: read an English word (max 20 characters) from the User into Array FirstWord.
  2. For Option p: print the English word in Array FirstWord on the screen.
  3. For Option I: read another word from the user in Array Second Word and a position to insert the second word in the first array at the given position.
  4. For Option d: read a position and the number of characters to delete from the Array FirstWord starting from the given position. 5. For Option R: read a number and a position from the user and shift the array FirstWord to the right starting from the given position and as many positions as the given number. 6. For Option L: read a number and a position from the user and shift the array FirstWord to the left starting from the given position and as many positions as the given number.

Corner Cases

You will need to make sure that the following conditions are not violated:

  1. FirstWord should not printed on the screen unless first read using menu option r
  2. Declare all arrays of size 100 to make sure all values will fit in the arrays.
  3. The number characters to delete must not be greater than the available characters.
  4. Shift right or left of the array must not exceed bounds of the array i.e., array index or position can’t be more than 99 and less than 0.
  5. In case of any errors the programs should print error, message and doesn’t perform the desired operations. For example, printing of the FirstWord without reading, deletion, insertion and shifting that crosses Forward array bounds. 6. After completion of each operation the array FirstWord should be printed on the screen. Write a C++ Code for the above mention problem, and also submit the screenshots after running this program.

This is either a homework or workplace assignment. For homework, tell us where you are stuck in your design or code.
For workplace assignments supply a full RFQ along with the pay for the work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.