

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Quiz: Friday (October 14) - Primarily on arrays, ArrayLists, and Strings Read: Section 5.1 through 5.5 (pages 112 โ 129) Last Time: Strings and Random Numbers Strings: Let's try some examples: Print every other character in a String Print a String in reverse order Random Numbers Java includes a class for generating random numbers. What is it called? What package is it contained in? (That is, where do you need to tell Java to look for the Random class in an import statement?) How do you create an instance of a Random? How do you generate a random number?
Let's look at an application that does some String manipulation. Open the tech-support application. Go ahead and create a SupportSystem object. Tell it about your computing problems. It's not a very good system, is it? There are 3 classes: SupportSystem, InputReader, and Responder. The InputReader class gets user input. The Responder class generates a response. Let's look at the Responder class. Let's examine the code of class SupportSystem: The constructor creates an InputReader and a Responder. There are a couple of methods that print messages. The start method does the most interesting work. It has a while loop - What does this loop do normally?