Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ please follow the instructions, make sure you follow all. Dal ASSIyuler 4 2020.uula Program Description: This is a not an ordinary Pig Latin. Write

C++ please follow the instructions, make sure you follow all.
image text in transcribed
image text in transcribed
Dal ASSIyuler 4 2020.uula Program Description: This is a not an ordinary Pig Latin. Write a program that reads a sentence as input and converts each word from English to "Pig Latin". In this version, to convert a word to Pig Latin you would follow the following steps: 1. First convert the sentence to upper case, 2. Find the substring "ig" (regardless of case). If there is one, remove the rest of the sentence include "ig". 3. And then you append the c-string "ay" (in lower case) to the end of the sentence. 4. Append the length of the sentence to the end. 5. Now covert the sentence back to lower case Here are some examples: English night Tiga Tinglich nicht English Net.hr Pg Latin: hercay17 * notice in the last example, 1-G is NOT continuous, so it not the same as "IG" Repeat until user has entered a "QUIT" (regardless of case). You are required to use C-strings for this program. Functions: Main function should be shorter than half a page. Function vod e o l eh Rene . This is covere given to uppercases This function should cover the givene-string to lowercase ) This i nd the string is the given string and Temeve the rest of the string include 10 This function should e called when you successfully "I and the main string Append a "ay lower towards the end of the ring wonder lancar . This function should provide a do-while for a while loop te wwer input to upper case fin, then call"indAndRemove and pendly in that onder Notice your program should stops as we ha d a wil messages of the cou ple bu "uiting or play whethe process is finished Hints: 1. "ay" will be attached to the end of the c-string regardless 2. No inputs are longer than 180 characters, guaranteed. 3. No input validation needed. (everything and anything has a corresponding interpretation in Pig Latin) 4. When user enters "quit" (regardless of case), you should display a message "Quit!" Sample Output: Sampe Output Please enter a single quittoep the process Please enter a single quitte stop the process le quitte stop the process Please enter No "G " here no hay 17 Please enter a stringonier quilt step the price First they go you, then they then they fight you then you first they all Please enter a stringenter quit to stop the process then they d o , then you win then they ay 13 P rancia de thee everyo Please enter a string.enler quill step the process quittay? Please enter ingenier quilto stop the preces Other requirements: 1. C-string() should be dynamically allocated. All memory dynamically allocated should be freed as soon as you are finished with a task. 2. Use functions as provided in the section above. Functions should not be modified. 3. Follow programming style guideline very carefully. a. Points will be taken off for all violations 4. Your output style has to match with my output shown below (although you can try different user input). 5. When accessing array, use only pointer syntax. You should only use ptr or *ptr for accessing memory addresses or values. You cannot use I 6. NO global variables permitted 7. All functions must have prototypes. 8. Store all values as variables, do not hardcode any values (for example: size should be saved as a variable). Use constant variables as much as possible a. const int SIZE = 81; 9. Use a line separator between all function definitions. (1/****101 stars******, blank line before and after) 10. All assignments must be submitted and run as specified to pass the course (see syllabus) 11. Copy and paste your output at the end of your program. Comment out the output lines. Dal ASSIyuler 4 2020.uula Program Description: This is a not an ordinary Pig Latin. Write a program that reads a sentence as input and converts each word from English to "Pig Latin". In this version, to convert a word to Pig Latin you would follow the following steps: 1. First convert the sentence to upper case, 2. Find the substring "ig" (regardless of case). If there is one, remove the rest of the sentence include "ig". 3. And then you append the c-string "ay" (in lower case) to the end of the sentence. 4. Append the length of the sentence to the end. 5. Now covert the sentence back to lower case Here are some examples: English night Tiga Tinglich nicht English Net.hr Pg Latin: hercay17 * notice in the last example, 1-G is NOT continuous, so it not the same as "IG" Repeat until user has entered a "QUIT" (regardless of case). You are required to use C-strings for this program. Functions: Main function should be shorter than half a page. Function vod e o l eh Rene . This is covere given to uppercases This function should cover the givene-string to lowercase ) This i nd the string is the given string and Temeve the rest of the string include 10 This function should e called when you successfully "I and the main string Append a "ay lower towards the end of the ring wonder lancar . This function should provide a do-while for a while loop te wwer input to upper case fin, then call"indAndRemove and pendly in that onder Notice your program should stops as we ha d a wil messages of the cou ple bu "uiting or play whethe process is finished Hints: 1. "ay" will be attached to the end of the c-string regardless 2. No inputs are longer than 180 characters, guaranteed. 3. No input validation needed. (everything and anything has a corresponding interpretation in Pig Latin) 4. When user enters "quit" (regardless of case), you should display a message "Quit!" Sample Output: Sampe Output Please enter a single quittoep the process Please enter a single quitte stop the process le quitte stop the process Please enter No "G " here no hay 17 Please enter a stringonier quilt step the price First they go you, then they then they fight you then you first they all Please enter a stringenter quit to stop the process then they d o , then you win then they ay 13 P rancia de thee everyo Please enter a string.enler quill step the process quittay? Please enter ingenier quilto stop the preces Other requirements: 1. C-string() should be dynamically allocated. All memory dynamically allocated should be freed as soon as you are finished with a task. 2. Use functions as provided in the section above. Functions should not be modified. 3. Follow programming style guideline very carefully. a. Points will be taken off for all violations 4. Your output style has to match with my output shown below (although you can try different user input). 5. When accessing array, use only pointer syntax. You should only use ptr or *ptr for accessing memory addresses or values. You cannot use I 6. NO global variables permitted 7. All functions must have prototypes. 8. Store all values as variables, do not hardcode any values (for example: size should be saved as a variable). Use constant variables as much as possible a. const int SIZE = 81; 9. Use a line separator between all function definitions. (1/****101 stars******, blank line before and after) 10. All assignments must be submitted and run as specified to pass the course (see syllabus) 11. Copy and paste your output at the end of your program. Comment out the output lines

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

Samsung Galaxy S23 Ultra Comprehensive User Manual

Authors: Leo Scott

1st Edition

B0BVPBJK5Q, 979-8377286455

More Books

Students also viewed these Databases questions