Question: Programming (Decision Structure and Method). You need to write a program to get students' name. All characters in the string should be letters (both uppercase
Programming (Decision Structure and Method). You need to write a program to get students' name. All characters in the string should be letters (both uppercase and lowercase are fine). So, if the user enter a string that contains characters other than letters, please display "Error: please enter a name"; otherwise, display "Thank you" Here is the main method of the program. public static void main(String[] args) Scanner input = new Scanner(System.in); String name = getName(input); Validate(name)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
