Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a recursive method to return the number of uppercase letters in a string. Write a test program that prompts the user to enter a

Write a recursive method to return the number of uppercase letters in a string.

Write a test program that prompts the user to enter a string and displays the number of uppercase letters in the string.

Note that writing a non-recursive method will lead to a zero mark.

Hint: you can use Character.isUpperCase() method to check whether a character is uppercase or not.

The following example shows what the user will see on the screen:

This program calculates the number of lowercase letters in a string. Enter a string: HelloWorld! The number of lowercase letters:2

In the above examples, user should provide the information shown in italic. Your program should calculate and display the rest. Test your program with different inputs.

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

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago