Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program to print the face on the left out of characters. Your program sh

ID: 3885941 • Letter: W

Question

Write a program to print the face on the left out of characters. Your program should have 6 System.out.printin(...) statements. Even for programs as simple as this it helps to write and test your programs in small steps. Start with just the 2nd, 3rd, and 4th line and test that first. Note that the eyebrows are underscore characters. The 1st line for the hair uses double quotes. To include those in a string you must precede each with a backslash character like: The last 2 lines for the chin use backslashes and forward slashes. The backslashes will also need to be preceded with a second backslash like: We want to encourage you to have fun in this class. Write a second program that makes a face of

Explanation / Answer

PROGARAM:

public class face{

public static void main(String args[]){

System.out.println(" """""""");

System.out.println(" | _ _ |");

System.out.println("0| o o |0");

System.out.println(" | 7 |");

System.out.println(" \ ___ /");

System.out.println(" \___/");

}

}

OUTPUT:

"""""""
| _ _ |
0| o o |0
| 7 |
___ /
___/

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote