Question: Java In this exercise, you will write the `printIntroduction(String name)` method. This method takes as input a String called `name`, where you may assume `name`
Java
In this exercise, you will write the `printIntroduction(String name)` method. This method takes as input a String called `name`, where you may assume `name` can be a maximum of 30 characters and can only consist of spaces/uppercase letters/lowercase letters. `name` can also be null or an empty String. This method should print out 5 lines where: the 1st and 5th lines contain just asterisks; the 2nd and 4th lines start with an asterisk, followed by space characters, and end with an asterisk; and the 3rd line starts with an asterisk, followed by a space character, then followed by the message "Hello ``! Welcome to CSE 8B!", then followed a space character, and ends with an asterisk. All 5 lines should contain the same number of characters, so the 3rd line (line that contains the message) defines the length of the rest of the lines. If the `name` argument is null or is an empty String (""), then the message will simply be printed without a name
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
