Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( I HAVE SENT YOU ALL THE INFORMATION YOU NEED, I HAVE SENT YOU WHAT TASKS A AND B WERE, MY CODE FOR THAT, THE

(I HAVE SENT YOU ALL THE INFORMATION YOU NEED, I HAVE SENT YOU WHAT TASKS A AND B WERE, MY CODE FOR THAT, THE CODE I SENT FOR TASK A/B IS ALL THERE, AND YOU ADD ON TO THAT WITH TASK C WHICH I HAVE ALSO SENT, AND HAVE ALL THE FUNCTIONS, LEAVE ANOTHER COMMENT BEING MORE SPECIFIC OF WHAT INFORMATION YOU NEED IF YOU STILL DONT GET IT)

Do the following well, please follow all directions, send correct codes and make sure you send the output as well so i know it runs, please follow everything well and complete this task:

Work through the tasks sequentially (implement and test).

Remember that the function prototypes and global-variables must be exactly as specified in this project specification. Lastly, do NOT use EOF(End of File),

Test your code before sending.

I already did Task A and B and have the conbined code for it, and you have to do Task C and what you do for Task B is added on to my code for Task A and B as I have the functions completed for task a and b and you have to add the functions of task C regarding addword, editword, and remove word on to it and make sure code runs.

PLEASE PLEASE MAKE SURE YOU IMPLEMENT THE CODE WELL, I HAVE ASKED THESE TYPE OF QUESTIONS PREVIOUSLY AND I ALWAYS GET WRONG ANSWERS.

Task A: Dictionary using Arrays

image text in transcribed

IMPORTANT: THE FOLLOWING EXAMPLE SHOWN IS RAN ON GRADESCOPE, YOU CAN SHOW THE MAIN FUNCTION BUT IT MUST BE COMMENTED OUT AS WHEN RAN ON GRADESCOPE IT HAS ITS OWN TEXT FILE AS THE INPUT WHICH ITLL CALL FOR READWORDS.

^^ this is why for my code i commented out the main function as that is not needed for when it is ran, but i will send the main function so you can use that for task b

image text in transcribed

This is Task B and the functions (note in my code i have those comments of what the following function is and then did the function so please do the same for task C)

image text in transcribed

Now this is my code, keep in mind through gradescope i did not send the main function as it had its own task file and that is the same for task c so keep that in mind that you just comment out the main function for task c and use my code for task a/b to help for it.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

This is the code i did above and it ran on gradescope and worked and now you have to do Task C which is the following:

image text in transcribed

PLEASE LOOK AT EXAMPLES WELL, FOLLOW ALL DIRECTIONS WELL, AND SEND GOOD AND CORRECT CODE

Make sure your program produces the correct output .

Please do this all well

As said in earlier tasks only a cpp file without the main function must be submitted, so make sure it can pass all the tasks.

It is important to make sure that Only the single .cpp file gets submitted so Remove or comment out the main function from your code before submitting it Otherwise, the autograder will fail. As stated in examples earlier, the text file will be inputted by the computer through the functions you add and as it says after it will call readWords to modify the variables and print the result. Make sure to follow all directions well and the part listed in the @ param part specifically.

MAKE SURE THAT THE OUTPUT WOULD COME BASED ON GRADESCOPE HAVING ANY TYPE OF TEXT FILE READY, YOU CAN MAKE THE MAIN FUNCTION FOR YOU AND I TO TEST IT BUT THEN IT SHOULD BE COMMENTED OUT.

Something like that that if it appears as the output on replit would work but then the main would be commented out for the gradescope, do not use it exactly like that but as an example of what the output could look like when you run it before gradescope uses its own file to run it.

PLEASE MAKE SURE BEFORE YOU DO THE FUNCTION FOR TASK C, YOU LEAVE THE COMMENT WHAT FUNCTION IT IS (ITS WRITTEN IN THE QUESTION)

AND PLEASE MAKE SURE YOU SEND THE FULL CODE WITH THE CODE THAT I SENT WITH THE CODE YOU MAKE

Please leave a comment if you dont understand something

A regular dictionary contains the words and the definitions. In addition to the words and the definitions, we will also store the part-of-speech (pos). The words, definitions and pos are going to be stored in Arrays. Use these global-variables in your code outside main() function: const int g_MAX_WORDS =1000; int g_word_count =0; string g_words[g_MAX_WORDS ]; string g_definitions[g_MAX_WORDS ]; string g_pos[g_MAX_WORDS ]; Create a C++ file and add the following function: Here's an example text file: WORD POS : DEFINITION Grumpy Adjective : bad-tempered and irritable Professor Noun : a teacher of the highest rank in a college or unive: Does Verb : perform (an action, often of unspecified nature) Nothing Adverb : not at all Example: Calling readWords () on the above text file will modify the global variables like this: g_MAX_WORDS : 1000 g_word_count: 5 g_words: [ "WORD", "Grumpy", "Professor", "Does", "Nothing"] g_pos: ["PoS", "Adjective", "Noun", "Verb", "Adverb"] g_definitions : [ "DEFINITION", "bad-tempered and irritable", "a teacher of the highest rank in a college or university", "perform (an action, often of unspecified nature)", "not at all" ] Now that we have the words stored, it is time to provide functions that allow users to use our dictionary. Add and implement the following functions: Remember to test each function before moving on to implement the next one. Similar to Task A, submit only one .cpp file without the main() function. Languages evolve constantly. Hundreds of new English words are added to the English dictionary each year. Definitions of words change. Thus, we should be able to modify, add and remove words in our dictionary. Besides, don't you want to use your own words for hangman? Add and implement the following functions to your . cpp file: Hint: For the removeWord () function, the order of the global-arrays doesn't matter. An empty string array is full of empty strings (an) You can use the functions you wrote previously within the implementation of Task C functions. The getIndex () function is extremely useful! Test each function before moving on to implement the next one. Submit only one .cpp file without the main() function similar to the previous tasks

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

1. How do most insects respire ?

Answered: 1 week ago

Question

Who is known as the father of the indian constitution?

Answered: 1 week ago

Question

1.explain evaporation ?

Answered: 1 week ago