Question: I need help in writting a program in JAVA that draws a smiley face as shown below. Use System.out.println for each line of the smiley
I need help in writting a program in JAVA that draws a smiley face as shown below.
Use System.out.println for each line of the smiley face. You need to include every space that you want to print. For example to print:
12345
xxx
You could use 2 println statements:
System.out.println("12345");
System.out.println(" xxx");
Also, printing certain characters is a little more difficult because they have special meaning. If you want to print a backslash \, then you have to put 2 of them in a row in the println statement. For example:
System.out.println("a backslash \\ is printed");
Will produce:
a backslash \ is printed
Okay, now lets look at the smiley face for this assignment
Sample Run:
---------------------
/ ___ ^^^ \
| ( . ) ( . ) |
| L |
| |
| \______/ |
\_____________________/
Extra Notes:
Did you correctly name the package/folder?
Did you correctly name the class/file?
Did you include comments?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
