Design a class named Message to represent a sentence or phrase.The class will contain: • a private string data field to hold thesentence or phrase. • A no-arg constructor with an empty stringmessage.
• A constructor that create a message object with the specifiedstring sentence or phrase.
• Accessor and mutator (getter/setter) for string datafield.
• A method named getVowels ( ) that returns the number of vowelsin a sentence or phrase.
• A method named getConsonants( ) that returns the number ofconsonants in a sentence or phrase.
• A method named getDigits( ) that returns the number of digitsin a sentence or phrase.
• A method named getUpperCase( ) that returns the number ofuppercase letters in a sentence or phrase.
• A method named getLowerCase( ) that returns the number oflowercase letters in a sentence or phrase. Draw a UML diagram forthe Message class and then implement it. Write a test program touse the class and demonstrate all methods in the message class.
What do I include as part of the solution ?
• UML diagram for message class.
• Algorithms (flowchart or pseudocode, 25 pts)
for the following methods: getVowels(), getConsonants( ),getDigits (), getUpperCase ( ), getLowerCase ( ). Use a pdf file tosubmit the flowchart. Remember to include a legend of the variablesused as part of the solution.
• JAVA source codes (source.java) – class and demo program ( 25pts )