CS 1401, Quiz #3

Date: Tuesday, February 6, 2007
Name:____________________________________________________________
Class section (9 am or 10:30 am): _______________________________

1. For each of the following topics, write "yes" or "no" depending on whether this topic is covered in Chapter 3, the chapter that you were supposed to read before the class:

if-then statements

storing numbers to a file

while loops

Graphical User Interfaces

2. Write a main method that asks the user to enter an integer, doubles this integer, and prints the result. Reminders: a main methods should start with

public static void main(String [] args){
and to read, we must declare a reader, e.g., as
Scanner console = new Scanner(System.in);























3. The String variable yesterday contains the text "February 5, 2007". What will be the value of the string longAgo after the following command:
longAgo = "Jan" + yesterday.substring(4,yesterday.length());