Design and code a swing gui to translate test

Assignment Help JAVA Programming
Reference no: EM131921264

Problem

Design and code a SWING GUI to translate test this is input in English into Pig Latin.

You can assume that the sentence contains no punctuation.

The rules for Pig Latin are as follows: For words that begin with consonants, move the leading consonant to the end of the word and add "ay".

Thus, "ball" becomes "all bay"; "button" becomes "uttonbay"; and so forth. For words that begin with vowels, add "way' to the end of the word.

Thus, "all" becomes "allway"; "one" becomes "oneway"; and so forth. Use a FLOWLAYOUT with a JTEXTAREA for the source text and separate JTEXTAREA for the translated text.

Add a JBUTTON with an event to perform the translation.

A sample application is shown next with the text translated to Pig Latin.

To parse the source text, note that you can use the SCANNER class on a STRING.

For example, the following code Scanner scan = new Scanner ("foo bar zot"); While (scan.hasNext()) { System.out.println(scan.next()); }

Will output: foo bar zot

Reference no: EM131921264

Questions Cloud

Analyze whether the free exercise clause : The purpose of this assignment is to emphasizes a different perspective from which to view the law: action taken by the government must come.
Compare and contrast rory sutherland concept : After reviewing this module's resources, compare and contrast Rory Sutherland's concept of "frame of reference"
What is the amount of tugboat accumulated earnings : Tugboats made a distribution of $25,000 cash to its stockholders on April 1, 2011. What is the amount of Tugboat's accumulated earnings
How does your current or past company you work for : Explore the video tab using the key term capital investment. As you learned in this unit, there are various sources of information.
Design and code a swing gui to translate test : Design and code a SWING GUI to translate test this is input in English into Pig Latin - A sample application is shown next with the text translated to Pig Latin
Provide a technique for strengthening managerial skills : Identify managerial skills that were personal weaknesses in that role. Provide a technique for strengthening managerial skills.
What are the annual net cash inflows : Doughboy Bakery would like to buy a new machine for putting icing and other toppings on pastries. What are the annual net cash inflows that will be provided
Could a state effectively enforce a law that banned : Could a state effectively enforce a law that banned all communication between minors and sex offenders through social media sites? Why or why not?
Record the purchase of the building : Give the journal entry to record the purchase of the building and the issue of the mortgage note payable on December 31, 2012

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create an application using html5

Create an application using HTML5, CSS, and JavaScript that has an image or figure of a trashcan

  Run both c++ and java versions of your program

In C++, create an Exception class, and a DivideByZero sub-class that takes a string for its constructor, and use this in the try-catch mechanism. In Java, use the division by zero exception object.

  Write a program that will process the data file

Write a program that will process the data file to read the file and calculate the number of assistants and the average salary and the number of associates and the average salary

  Calculates the area of a triangle

Write a simple Java application which calculates the area of a triangle. Your application should ask the user to enter the base and height values of the triangle.

  Why is it important to avoid the use of reserved words

Why is it important to avoid the use of reserved words as you define variables, functions, methods, or identifiers? Do you have any get-arounds to the use of these reserved words that you like to use?

  Detailed explanations for polymorphism and inheritance

Prepare a 6-8-page document that provides detailed explanations for polymorphism, inheritance, and encapsulation

  Write a credit card validation program

Write a Credit card validation program. Credit card numbers follow certain patterns. A credit card number must have between 13 and 16 digits.

  Aims1 to understand actual communication with an smtp

aims1. to understand actual communication with an smtp server can be achieved using tcp sockets.2. to understand the

  Writing a program to calculate the terms

The third programming project involves writing a program to calculate the terms of the following sequence of numbers: 0 1 2 5 12 29 ... where each term of the sequence is twice the previous term plus the second previous term. The 0th term of the s..

  How the wireless technology initiatives will change the way

How the wireless technology initiatives will change the way in which global voice, email, data exchange and message will be impacted in the years ahead.

  Method that receives an array and returns with no duplicate

Write a program that contrains a method that receives an array and returns a new array with no duplicates.

  Write a java application titled mystringtest

Write a Java application titled MyStringTest that creates an instance of the String class and initializes this instance with a String literal.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd