CS 1401, Quiz 6, TR version

Date: Tuesday, October 8, 2013
Name (please type legibly, ideally in block letters): ______________________________________________________________________

1. In the beginning of the Simpsons cartoons, Bart is usually writing the same phrase on the board several time, e.g., "I will not chew gum in class 1", "I will not chew gum in class 2", ... Write a main method that asks the school's principal for a message and for the number of classes to which it applies, and prints this message the required number of times. Trace your method on the example of the message "I will not chew gum in class X" applied to three classes (X = 1, 2, and 3).

import java.util.Scanner;

public class Quiz6 {
   public static void main(String[] args){
       Scanner input = new Scanner(System.in);