Question

In: Computer Science

Problem: Text manipulation as a technology has a myriad of applications, including coding and decoding, textual...

Problem: Text manipulation as a technology has a myriad of applications, including coding and decoding, textual analysis to determine authorship of a document, and automatic translation between languages. Learning to parse and process textual data is a valuable skill to master.


Your assignment: Design, develop, and test an Object-Oriented C++ program to process multi-word phrases and sentences in a variety of ways. In this case, the required processing includes 1) reversing the words in a phrase, 2) sorting the words within the phrase in ascending order, and 3) applying the Rot13 encoding to all the characters in the original phrase.


Discussion: Phrases are composed of words, which are in turn composed of characters. In C++, those characters are represented as bytes, using the ASCII standard to encode each character as a number. Parsing a string involves breaking a string up into its component words, using spaces as the delimiters between words. This project requires first that the user’s input phrase be parsed into its component words, and then each word must be handled as an individual entity. In all the phrase processing except the Rot13 conversion, words must be kept intact.

Consider the following issues when preparing your solution.


- Create a user-defined Phrase class to manage a phrase and the words within it. This class must have one or more constructor(s) for initialization and multiple methods to perform the various operations on the phrase and its words.

- Create a single instance of the class in function main()

- Repeat the following steps until the user opts to quit:

- Prompt the user for a phrase or sentence, and read it into a single string

- Initialize the Phrase object with the user-input string

- Display the following conversions of the user-input string as produced by public methods of the Phrase class. The case of each letter must be preserved from the input string to each of these conversions. Each conversion must produce a separate output string.

- Reversed word order

- Sorted word order

- Rot13 character encoding

- In the Reversed Word and Sorted Word conversions, all words must remain intact and readable with regards to the spelling and capitalization of each word. For this assignment, leading and trailing punctuation should be considered a part of each word.

Coding:

- Each user-defined class must be defined within its own set of .h (.hpp in Xcode) and .cpp files.

- There should be three files.

- The first file is main.cpp.

- The second file is Phrase.cpp The is the file where the definitions are written for the classes.

- The third file is Phrase.h This is the header file where the functions are declared for the classes.

- The program must accept any string, including multiple words with embedded spaces, as input.

- Validate all inputs and do not proceed until valid values are entered.For input strings, the only validation required is that the input string must not be empty.

Hopefully I can get some help on this one - this has been answered before on here, but the provided answers are all copies of one another that use the same code and do not work as required. Any help would be greatly appreciated and will be upvoted.

Make the program as simple as possible. Use introductory Object-Oriented C++ programming. If all the requirements are met, then this will be upvoted.

PLEASE DO NOT COPY FROM OTHER CHEGG ANSWER

Solutions

Expert Solution


Related Solutions

Problem: Text manipulation as a technology has a myriad of applications, including coding and decoding, textual...
Problem: Text manipulation as a technology has a myriad of applications, including coding and decoding, textual analysis to determine authorship of a document, and automatic translation between languages. Learning to parse and process textual data is a valuable skill to master. Your assignment: Design, develop, and test an Object-Oriented C++ program to process multi-word phrases and sentences in a variety of ways. In this case, the required processing includes 1) reversing the words in a phrase, 2) sorting the words...
Problem: Text manipulation as a technology has a myriad of applications, including coding and decoding, textual...
Problem: Text manipulation as a technology has a myriad of applications, including coding and decoding, textual analysis to determine authorship of a document, and automatic translation between languages. Learning to parse and process textual data is a valuable skill to master. Your assignment: Design, develop, and test an Object-Oriented C++ program to process multi-word phrases and sentences in a variety of ways. In this case, the required processing includes 1) reversing the words in a phrase, 2) sorting the words...
Problem: Text manipulation as a technology has a myriad of applications, including coding and decoding, textual...
Problem: Text manipulation as a technology has a myriad of applications, including coding and decoding, textual analysis to determine authorship of a document, and automatic translation between languages. Learning to parse and process textual data is a valuable skill to master. Your assignment: Design, develop, and test an Object-Oriented C++ program to process multi-word phrases and sentences in a variety of ways. In this case, the required processing includes 1) reversing the words in a phrase, 2) sorting the words...
Please write a complete C coding program (NOT C++) that has the following: (including comments) -...
Please write a complete C coding program (NOT C++) that has the following: (including comments) - declares two local integers x and y - defines a global structure containing two pointers (xptr, yptr) and an integer (z) - declares a variable (mst) by the type of previous structure - requests the values of x and y from the user using only one scanf statement - sets the first pointer in the struct to point to x - sets the second...
PCR is a technology that has many useful applications with biotechnology. What are some of those...
PCR is a technology that has many useful applications with biotechnology. What are some of those applications? What are the advantages of PCR over gene cloning for generating many copies of a DNA fragment? Humans are almost identical in the protein-coding sections of the genome, yet each individual has a unique DNA profile. Explain how this is possible?
PCR is a technology that has many useful applications with biotechnology. What are some of those...
PCR is a technology that has many useful applications with biotechnology. What are some of those applications? What are the advantages of PCR over gene cloning for generating many copies of a DNA fragment? Humans are almost identical in the protein-coding sections of the genome, yet each individual has a unique DNA profile. Explain how this is possible.
PCR is a technology that has many useful applications with biotechnology. What are some of those...
PCR is a technology that has many useful applications with biotechnology. What are some of those applications? What are the advantages of PCR over gene cloning for generating many copies of a DNA fragment?
Molly, the coding supervisor of Homer General Hospital, has a problem. Her Discharged Not Final Billed...
Molly, the coding supervisor of Homer General Hospital, has a problem. Her Discharged Not Final Billed (DNFB) report is staying significantly over the limit that administration desires. She is also behind in some of the compliance monitoring that needs to be completed. Molly has been given the mandate to determine what needs to be done to bring the DNFB down and still maintain quality, as well as keep current in the compliance monitoring. She pulled together the information shown in...
c++problem Amelia is a computational geometry scientist. Her research has a broad range of applications –...
c++problem Amelia is a computational geometry scientist. Her research has a broad range of applications – from pure geometry applications, to applied fields such as computer mathematics, or physical simulations. As her research assistant, you’re going to help her analyze some triangles in 2d space that she generated from a sample program. Amelia is aware of the fact that you’re new to C++ so the task is easy this week (Based on what Amelia’s more experienced assistants say, this means...
Lack of places to sit and relax has been a problem in Ibri College of Technology...
Lack of places to sit and relax has been a problem in Ibri College of Technology for many students. They find it difficult to choose a place in their breaks where they can sit after a class or while waiting for their next class. Write a recommendation report to Dr Hamdan Al Manthari based on the problem given. Your report should have a heading, introduction, discussion of recommendations and a conclusion. Give your report a title.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT