1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zhuklara [117]
4 years ago
8

Write an application that encodes English-language phrases into pig Latin. Pig Latin is a form of coded language. There are many

different ways to form pig Latin phrases. For simplicity, use the following algorithm:To form a pig Latin phrase from an English-language phrase, tokenize the phrase into words with String method split. To translate each English word into a pig Latin word, place the first letter of the English word at the end of the word and add the letters "ay." Thus, the word "jump" becomes "umpjay," the word "the" becomes "hetay," and the word "computer" becomes "omputercay." Blanks between words remain as blanks. Assume the following: The English phrase consists of words separated by blanks, there are no punctuation marks and all words have two or more letters. Method printLatinWord should display each word. Each token is passed to method printLatin-Word to print the pig Latin word. Enable the user to input the sentence. Then display the converted sentence.
Computers and Technology
1 answer:
deff fn [24]4 years ago
3 0

Answer:

Answer has been attached to this response as a source code file saved as "PigLatinWord.java"

Explanation:

Explanation has been added to the source code in the form of comments. Please go through the comments in the code.

Hope this helps!

Download java
You might be interested in
MIPS assembly language
maria [59]

Answer:

the answer is a t t i c

Explanation:

7 0
3 years ago
Design a function int maxDigit (int num) to find and return the greatest digit from the arguments value num.
AfilCa [17]

Answer:

Below is the required JAVA Code:

Explanation:

public static int largestDigit(int n) {

   if (n < 0) {

       return largestDigit(-1 * n);

   } else if (n == 0) {

       return 0;

   } else {

       int digit = n % 10;

       int maxDigit = largestDigit(n / 10);

       if (digit > maxDigit)

           maxDigit = digit;

       return maxDigit;

   }

}

\color{red}Method\;tested\;in\;a\;complete\;java\;program\;if\;you\;are\;interested.

public class LargestDigitRecursive {

   public static int largestDigit(int n) {

       if (n < 0) {

           return largestDigit(-1 * n);

       } else if (n == 0) {

           return 0;

       } else {

           int digit = n % 10;

           int maxDigit = largestDigit(n / 10);

           if (digit > maxDigit)

               maxDigit = digit;

           return maxDigit;

       }

   }

   public static void main(String[] args) {

       System.out.println(largestDigit(14263203));

       System.out.println(largestDigit(845));

       System.out.println(largestDigit(52649));

       System.out.println(largestDigit(3));

       System.out.println(largestDigit(0));

       System.out.println(largestDigit(-573026));

       System.out.println(largestDigit(-2));

   }

}

OUTPUT:

6

8

9

3

0

7

2

3 0
3 years ago
Paano mo maipapamalas na ikaw ay may malusog na kaisipan​
LenaWriter [7]
Okokokokokok okok ok
5 0
3 years ago
Image files contain metadata. Give three examples of this.<br> 1.<br> 2.<br> 3.
Elina [12.6K]

Answer:

Explanation:

We can add some metadata to an image or with some cameras when we take a photograph the camera gives some metadata to the image, for example, the camera brand, ISO, aperture, and shutter speed.

An image regularly has some metadata by default like dimensions, weight, and height.

We can sell photos on the internet, and we can add some keywords, description, and titles.

5 0
4 years ago
What does it mean when your check engine light comes on?
Ludmilka [50]
This website has an article about the on-board diagnostics system (OBD system) which turns on the Check Engine light in a motorized vehicle: https://motorist.org/articles/check-engine-light

Hope it helps you!
5 0
4 years ago
Other questions:
  • Which of the following describes a poor design consideration for a form?
    14·1 answer
  • Which of the following questions will most likely be answered by displaying data on a line graph?
    14·1 answer
  • The values of the member variables of objectOne are being copied into the corresponding member variables of objectThree. This in
    12·1 answer
  • What information is displayed in the message header of a received message? Check all that apply.
    6·1 answer
  • im in honors comupter science and one of my questions is evaluate 18% 7 does anyone know how to answer that
    6·1 answer
  • What was the first e-commerce service
    13·1 answer
  • Microsoft words spell checker
    9·1 answer
  • Describe computer as a source of communication.​
    5·1 answer
  • Sensory cues are used for script writers to be able to get more creative with the story their are scripting for (i.e.
    15·1 answer
  • Explain why the scenario below fails to meet the definition of showrooming.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!