I am use Netbeans IDE and dont know hw to dis question please help.
I have to write a program that allows a user to enter a line of text, translates the message into Abracadabra language and gives the average number of vowels per word in the message(vowels are letters a,e,i,o,u or A,E,I,O,U). The program should contain a class Translator and a graphical user interface called TranslatorGUI.
The class Translator can be used to translate a sentence of words and has the following STATIC methods: 1) a method called translate accepts the sentence as a parameter, splits it into words and returns the translated sentence;
2) A method translateWord translates one word. If the word begins with vowel it returns the word in reverse order, otherwise swaps the first and the last letters in the word;
3) A method beginsWithVowel determines if the specified word begins with a vowel;
4) A method numberOfVowels calculates a number of vowels in a word;
5) A method Average calculates the average number of vowels per word in the sentence;
6) A suitable Main method which demonstrates the Translate method.
I have this UML diagram given here that might be of assistance: + translate(sentence : String) : String - translateWord(word : String) : String - beginsWithVowels(word : String) : boolean - numberOfVowels(Word : String) : int + average(sentence : String) : double + main(args : String[] : void
I also have to write a graphical user interface class called TranslatorGUI. It should be able to manipulate the sentence of words and have the following behavior: 1) Label "Enter a sentence" and the text field to enter the text to translate;
2) Label "Translated sentence" and the text field to display it;
3) Label "Average number of vowels" and the label to display it;
4) A button which is selected to translate the sentence and display the average number of vowels"
The class should also include a main method that prepares a frame in which the panel is displayed.
Please people help wid this and the other topic i have posted. Really need help. Thank you. -