Statistics

Problem Statement for "Oppish"

Problem Statement

PROBLEM STATEMENT

Write a method that translates a phrase into the language Oppish.

To translate a phrase into Oppish, add the letters "OP" before each vowel.
(quotes are for clarification only)


DEFINITION
Class: Oppish
Method Name: translate
Parameters: String
Returns: String
Method signature (be sure your method is public):  String translate(String
phrase);


NOTES
For the purposes of this problem, the vowels are 'A', 'E', 'I', 'O', and 'U'.
'Y' is NOT a vowel.

TopCoder will ensure the validity of the inputs.  Inputs are valid if all of
the following criteria are met:
* phrase contains between 1 and 16 characters, inclusive.
* each character of phrase is an uppercase letter ('A'-'Z'), or a space (' ').
* phrase begins and ends with a letter, and there is exactly one space between
words.


EXAMPLES
translate( "A" ) returns "OPA"
translate( "B" ) returns "B"
translate( "TOPCODER" ) returns "TOPOPCOPODOPER"
translate( "HELLO I AM SHREK" ) returns "HOPELLOPO OPI OPAM SHROPEK"
translate( "AAA" ) returns "OPAOPAOPA"
translate( "A E I O U Y" ) returns "OPA OPE OPI OPO OPU Y"

Definition

Class:
Oppish
Method:
translate
Parameters:
String
Returns:
String
Method signature:
String translate(String param0)
(be sure your method is public)

Constraints

    Examples


      This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2024, TopCoder, Inc. All rights reserved.
      This problem was used for: