Java Final Exam 07-08

Part 1. Programming (any 2)

A. Write a program that asks for the year, if the year is before 1492, the computer should respond with "What is taking Columbus so long ? If the date is 1949 the computer should respond with "George Bush is born !!!!" 50 times. If the date is greater than 2006 the computer should respond with "What ? Do you think I have a crystal ball ???"

B. Write an applet that writes your name inside a blue rectangle

C. Write a method called alarm that prints the string "Alarm!" multiple times on separate lines. The method should accept an integer parameter that specifies how many times the string is printed. Print an error message if the parameter is less than 1.

Part 2. On-line Test.