Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
Code Given: //TODO: document this class public class PA1e { /** * Counts the number of upper case characters * within the supplied string *
Code Given:
//TODO: document this class public class PA1e { /** * Counts the number of upper case characters * within the supplied string * * @param s input string * @return number of upper case characters */ public static int numUpperCase(String s) { return 0; // TODO: replace with your method implementation }
// TODO: document this method public static void main(String[] args) { // TODO: write your code here }
}
Write a program that prompts the user to enter a string and displays the number of the uppercase letters in the string. For example: Enter a string: Wentworth Is Terrific There are 3 uppercase characters in the string. Enter a string: break was short: There are no uppercase characters. Enter a string: Glad to be back coding! There is 1 uppercase character in the stringStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started