ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 11 Weeks Ago, 1 Day Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 04 May 2017 My Price 8.00

Write a program that will input a phrase and convert it to pig latin

The assignment is attached below just make sure you can run it with out any problems or errors, thanks in advance.

 

 

Part B: Pig Latin
Step 1: Requirements
Write a program that will input a phrase and convert it to pig latin. Put each word in a separate
element of a string array. Remove the first letter from each word and concatenate it to the end of the
word followed by “ay.”
Sample Output from Program:
*****************************************************
* You will be prompted to enter a string of *
* words. The string will be converted into *
* Pig Latin and the results displayed.
*
* Enter as many strings as you would like. *
******************************************************
Enter a group of words or ENTER to quit: Computer Programming is fun to learn!
Original words: Computer Programming is fun to learn!
New Words: omputercay ogrammingpray isway unfay otay earnlay!
Enter a group of words or ENTER to quit: Quit
Pig Latin Hint:
If a word begins with one or more consonants, move the consonant or consonant cluster to the end of
the word. Add the letters "ay" to the end of the word. So, "pig" would be "igpay," and “latin” would be
“atinlay.” Step 2: Processing Logic
Using the pseudocode below, write the code that will meet the requirements.
Main function
Display the heading
While the condition is true
Prompt the user for group of words or Enter to quit
Display original words
Call function pigLatinString( )
End while
pigLatinString( ) function
Declare and initialize string variables len, counter, start, begin, word and newString
While condition is true
Call find() and pass a space and start as parameters and return the returned value
to start
if start equals to string::npos Page 1 of 2
qattachments_1023363d4a3bba0101a84ec096aaaee29baa7823.docx jump outside the loop permanently
call substr() function
display the word
update newString
increment start by one
assign start to begin
End While
Call substr()
Update newString
Return newString Step 3: Create a New Project
Create a new project and name it LAB5B. Write your code using the Processing Logic in Part B, Step
2. Make sure you save your program. Step 4: Compile and Execute
a) Compile your program. Eliminate all syntax errors.
b) Build your program and verify the results of the program. Make corrections to the program
logic if necessary until the results of the program execution are what you expect. Step 5: Print Screen Shots and Program
1. Capture a screen print of your output. (Do a PRINT SCREEN and paste into an MS Word
document.)
2. Copy your code and paste it into the same MS Word document that contains the screen print
of your output.
3. Save the Word document as Lab05B_LastName_FirstInitial. END OF LAB Page 2 of 2
qattachments_1023363d4a3bba0101a84ec096aaaee29baa7823.docx

Attachments:

Answers

(11)
Status NEW Posted 04 May 2017 02:05 AM My Price 8.00

-----------

Not Rated(0)