March 21, 1997

repaint() and Consecutive Lines

Question: My applet draws lines. I click at the place where I want my line to start and then I click at the end of it. It draws a line

Writing a Factorial Method

Question: Can you help me complete the enclosed program? A “Factorial Method”must be written. /////// File: Factorial.java /////// class Factorial { /* put factorial method here */ public static void

Scanning for Words in a String

Question: I am currently writing an application to scan a text file for certain text keywords, and then copy the text (in between the kewords) into a new textfile. Could

‘Smart’ Painting

Question: It isn’t clear to me how to do ‘smart’ painting. For example, ifI want to paint only a portion of something, what should I do?There are paint/repaint methods that