Write a program in java to replace the word

Assignment Help JAVA Programming
Reference no: EM132109177

Programming in java

1) If a word ends in 'a', append an 'r'. For example "tuna" becomes "tunar", "Cuba" becomes "Cubar", and "idea" becomes "idear". (Don't change this to an 'h' based on the previous rule; leave it as an 'r'.) Do not apply this rule to the word "a", so "a tuna" should become "a tunar", not "ar tunar".

2) Replace the word "very" with the word "wicked". So "very hard" becomes "wicked hahd".

Make sure that these rules apply to capitalized words/letters as well as lower-case.

3) If 'r' is at the end of a word and is preceded by "ee" or 'i' replace 'r' with "yah" instead of 'h'. For example, "deer" becomes "deeyah" instead of "deeh", but "veneers" still becomes "veneehs".

4) If 'r' is at the end of a word and is preceded by "oo", replace 'r' with "wah". For example, "door" becomes "doowah" instead of "dooh" (but "doors" still becomes "doohs").

Reference no: EM132109177

Questions Cloud

Write a function that would be used in a recursive-descent : "Given a production, write a function that would be used in a recursive-descent parser for handling that production."
Write a program that transmits a series of characters : The sequence will consist of "AlphaNumber", where Alpha is meant to be a letter, cycling from A to Z, and Number is a digit that cycles through 0 to 9.
Create an algorithm for solving the following version : Create an algorithm for solving the following version of the m Smallest Numbers problem. Instead of just returning the m smallest values.
Compute the january balance for hulse in accounts payable : Hulse's sales journal for January shows a total of $111,109 in the selling price column, Compute the January balance for Hulse in Accounts Payable
Write a program in java to replace the word : If a word ends in 'a', append an 'r'. For example "tuna" becomes "tunar", "Cuba" becomes "Cubar", and "idea" becomes "idear".
List the phrases and simple phrases and the handle : Show the parse tree for the expression: ((id + id) * id) + id . List the phrases, simple phrases, and the handle.
Implement a recursive function static boolean : We have a set of coins of arbitrary positive values and want to see whether a given nonnegative total can be made using a some subset of the coins.
What are the current international trade patterns : BSBMKG605 Evaluate international marketing opportunities - Briefly describe how a recession might negatively affect global demand and the economy
Conduct of monetary policy : What can you say about their respective growth rates? What implications do these rates have on the conduct of monetary policy?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a void method shift

Write a void method Shift that takes three parameters A, p, d. A is an array, p is the number of positions and d is the direction (L = left, R = right). The method should shift the contents of A p positions in the d direction.

  Prove the correctness of the given program

CMPT 340-T1 - Why is this called slow exponentiation? To get one bonus point, give code that is exponentially faster in n, and to get the second bonus point

  Design into java code

As a design activity- the class diagram from a set of classes which form the basis for a simple project management tool. Your design should have the following classes: Employee Class, Project Class, Consultant Class, Manager Class, theAssignment Clas..

  Create a frame-based application that displays an array

Include a TextField in the South. When the user clicks a button, the course name should display in the TextField

  Relationship between employee class and the manager class

MCIS 5103: Advanced Programming Concepts

  Write a java applet that views staff information

Write a Java applet that views, inserts, and updates staff information stored in a table Staff in an Oracle Database. The View button displays a record with a specified ID

  Write a java program that display banner

Write a java program that display banner. (Use Applet) Example: HELLO ELLOH LLOHE LOHEL OHELL HELLO.

  Write a number guessing game in java

ou have to write a number guessing game in Java. The program should have three difficulty levels, each one having a different maximum number. After the user selects a difficulty,

  Write a class to create a card

One default that sets a card to 13 of Spades (which is equivliant to Ace of Spades espically when they need to print the card) and One that accepts two parameters - one int for rank of the card and one string for the suit of Card.

  Design a dynamic programming algorithm

Assume that at a station ti takes 2 hours to change horses and a horse takes (x ln x)/100 hours to travel x miles. Design a dynamic programming algorithm to determine a sequence of stations at which to stop so as to minimize the total hours.

  Prepare a program that constructs a binary tree

Write your own implementation of primitive operations and use self-referential classes in your implementation.

  How does a marketer balance the short-term gains

How does a marketer balance the short-term gains that sales promotion can deliver against the possible negative long-term consequences such promotions might have for brands? Use appropriate examples.

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