Objectives

Learning to use Eclipse to write and run your first program.

General instructions for all assignments

For each assignment you will write a Java program and test it. Start your programs with a comment block such as:

/*
  NAME: <your name>
  COS 160, Fall 2021, Prof. xxxxx, <Class day & time> 
  Program #1
  File Name: Face.java
*/

Your programs should be neatly formatted, and follow the indenting, formatting, spacing and commenting practices taught in class.

You should hand in printed copies of both your program and its output. We suggest that you just copy and paste each part of the assignment into a single document in a word processor. Within Eclipse you can highlight and copy code from the code panel, and you can copy the output from the Console tab.

Read each assignment carefully to see what is required. If you do not understand something in the assignment, ask a tutor or the instructor. You will get partial credit if you finish only part of an assignment or it isn't working correctly. Turn it in and explain what you completed and what issues it has. It is usually better to turn in an imperfect assignment on the due date, rather than falling behind in the course.

Program 1 (30 points) Printing a Face with Characters

Face made
                      of characters

Write a program to print the face on the left out of characters. Your program should have 9 System.out.println(...) statements.

Even for programs as simple as this it helps to write and test your programs in small steps. Start with just the first two lines and test that first.

For the girl's bangs and chin it gets a bit trickier because we used the special characters: double quote and backslash.

To include special characters you need to add a preceding backslash like: \" or  \\

Extra Creativity Credit (5 points) Another Face

We want to encourage you to have fun in this class. Write a second program that makes a face of your own design. It should be something unique that you design. We suggest starting with some graph paper and thinking about the characters that are available and what you can do with them.

What to turn in

Turn in your program(s) and their output(s). When you cut and paste your code or output into a word processor it may look distorted if it uses a non fixed width font.  If that happens, select your pasted text and change the font into a fixed width font such as Courier.  It is your responsibility to make your code and output neat and readable.