Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(Regarding the comment, I have sent the code for Task A that i did which you need to do Task B to add the function

(Regarding the comment, I have sent the code for Task A that i did which you need to do Task B to add the function on to, the indentations and everything work on the code),

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 have the code for it, and you have to do Task B and what you do for Task B is based off my code for Task A.

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

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 b so keep that in mind that you just comment out the main function for task b and use my code for task a to help for it.

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 B 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 task b 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.

Make sure to have the getline, the loops and everything and that the text file does not get implemented on the code, because gradescope has its own textfile that it uses the void from the code we make to get it.

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

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

Know how to use reservations systems to inventory demand.

Answered: 1 week ago