Exercise 9: reference parameters

Description

Having Trouble Meeting Your Deadline?

Get your assignment on Exercise 9: reference parameters  completed on time. avoid delay and – ORDER NOW

Description

Instructions

Create a C++ dictionary app with a loop that prompts the user for words to look up.

  • ??Study the https://github.com/fromlc/ex9_dictionary.git
  • ??Use the global string arrays dict::words and dict: defs for words and definitions. You may add words and their definitions if you wish.
  • ??Good code recognizes commands typed in any case, but for this exercise search for the word exactly as the user types it.
  • ??Don’t worry about validating user input – assume valid input for this exercise.
  • ??Get your lookup working first, and only then should you code the user prompt loop.
  • ??Write a function named lookup_word) that looks up words in the dict:words array.
  • ??Your function should accept two arguments:
  • ??a string reference parameter for the word to look up, and
  • ??a string reference parameter to hold the returned definition.
  • Your function should return an int that holds either:
  • ??the index of the word’s definition in the dict::words and dict::defs arrays, OR
  • o -1 if the word is not found in dict.:words array

    • ??In your function lookup_word(), call the string compare() function in a loop to search for the a word
    • ??Start by searching for a hard-coded word (“cat” or “dog”).
    • ??Once you can display a word’s correct definition, add the user prompt loop and look up the user’s words.
    • ??Terminate your loop when the user types
      “quit” in all lowercase.

    Submitting your work

    • ??Check the assignment rubric,
    • ??Test your code,
    • ??Fix all compiler errors and warnings, and
    • ??Submit your completed cp file.
Explanation & Answer

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Order Now and we will direct you to our Order Page at Litessays. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

Similar Posts