Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Comment every line of code. Guideline: convert uppercase character to lowercase character In this exercise, we will implement a small program that makes a string
Comment every line of code.
Guideline: convert uppercase character to lowercase character In this exercise, we will implement a small program that makes a string to lowercase. Something like String.toLowerCase0 The algorithm have to iterate all the string's characters (like we did in the previous post), and if the character is upper case, then we make it lower case. Characters are numbers so we just look at their values. If a character's value is not between the character's value ' and the character's value 'Z, then it's not an upper case letter. To make a character lowercase, we think in a similar way: if the characters are numbers, then mathematical operations on them are legal. Furthermore, because the character 'a' differs from the character A' for 32 positions, we just add to the upper case character (say M') the number 32 (and we get 'm). Let's start. The following code snippet is took from the previous post. It's just "while" loop with at the end some lines of code for printing on consoleStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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