TopcoderArchiveVisit Topcoder
SRM28 Feb 2002
SRM 69

Oppish

Problem statement, definition, constraints, and public examples.

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

      No public sample cases were explicitly marked for this problem in the original data.

      Back to all problems