Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

Identify nation-states considered to be the Arab states

Answered: 1 week ago

Question

dy dx Find the derivative of the function y=(4x+3)5(2x+1)2.

Answered: 1 week ago

Question

What is DDL?

Answered: 1 week ago