Question: Java Write a class (called Lotty) with a constructor that accepts a String object as its argument. The class should have a method that returns

Java

Write a class (called Lotty) with a constructor that accepts a String object as its argument. The class should have a method that returns the number of vowels in the string and another method that returns the number of consonants in the string. Demonstrate the class in a program that performs the following steps:1.The user is asked to enter a string; 2.The program displays the following menu: A.Count the number of vowels in the string; B.Count the number of consonants in the string. C. Enter another string; D. Exit the program. 3.The program performs the operation selected by the user and repeats until the user selects D, to exit the program. Deliverable Submit a single pdf document containing pseudocode, UML class diagram (for the standalone class), code and testing (output in the console).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!