I do not know how to add hyphens and try and catch statement

profilekandiman1010

java language

 

Please use the the language of your choice to complete the following problem:

Write a function or procedure that returns a hyphenated string. Valid input will be a string consisting only of alpha characters. Your function or procedure will return an alpha string where the interior letters are joined with a hyphen. For strings containing invalid input (non-alpha characters) please return an empty string ("" in most languages).

 

Please write a  comment in your code to tell us the programming language you choose to use.

 

Example input:

Test

ou4

it

 

Example output:

T-e-s-t

 

 

i-t

  • 13 years ago
  • 5
Answer(2)

Purchase the answer to view it

blurred-text
NOT RATED
  • attachment
    homework_completed.zip

Purchase the answer to view it

blurred-text
NOT RATED
  • attachment
    checkstring.java
Bids(1)