Assignment 30; Weasel

Code

    // Donovan Rich
    // Period 6
    // Weasel
    // Weasel.java
    // 10/1/2015
    
    import java.util.Scanner;
    
    public class Weasel {
    
        public static void main( String[] args ) { 
        
            Scanner keyboard = new Scanner(System.in);
            
            String word;
            boolean yep, nope;
            
            System.out.println( "Type the word \"weasel\", please." );
            word = keyboard.next();
            
            yep = "weasel".equals(word);
            nope = ! "weasel".equals(word);
            
            System.out.println( "Yout typed what I wanted you to: " + yep );
            System.out.println( "You ignored polite instructions: " + nope );
            
        }
    }
        

Picture of the output

Assignment 30