Question: Java Write the following char functions without using Javas String class or any other built-in methods/classes Assume c is a char inputted by a user

Java

  • Write the following char functions without using Javas String class or any other built-in methods/classes
  • Assume c is a char inputted by a user

1. isLetter(c) if c is an English letter (A-Z or a-z), then set the variable isLetter to true; otherwise, set isLetter to false.

2. isDigit(c) if c is a digit, then set the variable isDigit to true; otherwise, set isDigit to false.

1. Using a loop, print each character of the uppercase English alphabet (A through Z).

2. Using a loop, print each character of the uppercase English alphabet backwards (Z through A).

3. Using a nested loop (one loop nested inside of another loop), print the uppercase English alphabet (A through Z) n times, where n > 0 is an integer inputted by a user. You may assume the user will input a valid integer for n.

For example, if a user inputs 5 for n, your program should print the following:

ABCDEFGHIJKLMNOPQRSTUVWXYZ

ABCDEFGHIJKLMNOPQRSTUVWXYZ

ABCDEFGHIJKLMNOPQRSTUVWXYZ

ABCDEFGHIJKLMNOPQRSTUVWXYZ

ABCDEFGHIJKLMNOPQRSTUVWXYZ

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!