Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Java Program 4


use file Real estate agent advertisements frequently contain words from which all vowels — except for an initial one — have been removed. Thus, Desirable unfurnished flat in quiet residential area might become Dsrbl unfrnshd flt in qt rsdntl ar Write a complete Java program that reads in a normal one-line description of a property (terminated by a carriage-return) and outputs the corresponding advertisement. You may assume y is a vowel. Your program must implement a method modify that returns the advertisement with the letters removed: public static String modify(String ad) {...} Attachments
Tags Clarifications


Java Program 4 - Solution


Implemented the required method String modify(String ad) as asked.
Screen Shot 2016-11-26 at 21.09.58.png (30 K) Download Preview (1 K) Download Preview
} /** * Checks if the current letter is a vowel or not. * * @param ad The given text. * @param index The current index. * @return <code>TRUE</code> if the current letter is a vowel, <code>FALSE</code> otherwise. */ private static boolean isVowel(String ad, int index) { return ad.charAt(index) ==

Purchase Answer