Knock-Knock Lab

Overview

Create a version of the famous "Hello World" project - with a twist. Write a program that asks the user's name, greets the user by name, and tells a knock-knock joke.

Purpose

The purpose of this lab is to get you acquainted with programming in general, and Java in particular. The program itself is not complex, but there are many factors to writing it successfully:

The program

The actual program is quite simple. A transcript might look like this: (human input is in blue)

Hi, What's your name?
Andy
Here's a joke, Andy:
Knock knock
who's there?
Luke
Luke who?
Luke through the keyhole and you'll find out!
    

A perfect version of the program will do the following:

The program will require the following elements:

Turning it in

Please name this program Knock.java. Compile the file and combine Knock.java and Knock.class in a zip file called userid_knock.zip. (userid will be your own userid of course.) Turn the program in via oncourse.