NicholasCSW

HumanTester Freelance Industries

Mar 21st, 2017
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.25 KB | None | 0 0
  1.  
  2. /**
  3.  * Write a description of class Person here.
  4.  *
  5.  * @author (your name)
  6.  * @version (a version number or a date)
  7.  */
  8. import java.util.Scanner;
  9. public class Person
  10. {
  11.     public static void main(String [] args) {
  12.        
  13.         System.out.println("Hello, and welcome to the human tester program, from Freelance Industries.");
  14.         System.out.println("Question 1:");
  15.         boolean areTheyHuman = isHuman();
  16.         if(areTheyHuman = true) {
  17.            
  18.             System.out.println("Congratulations! According to our advanced testing protocol, you qualify as a non-sentient organsim.");
  19.            
  20.         }
  21.         else {
  22.            
  23.             System.out.println("It's 2017; you can't person without memes.");
  24.            
  25.         }
  26.        
  27.     }
  28.    
  29.     public static boolean isHuman() {
  30.        
  31.         System.out.println("Do you meme? y for yes, n for no.");
  32.        
  33.         Scanner scan = new Scanner(System.in);
  34.        
  35.         char inputted = scan.next().charAt(0);
  36.         boolean isHuman = false;
  37.        
  38.         if(inputted == 'y') {
  39.            
  40.             isHuman = true;
  41.         }
  42.         else {
  43.            
  44.             isHuman = false;
  45.         }
  46.        
  47.         return(isHuman);
  48.     }
  49.  
  50. }
Add Comment
Please, Sign In to add comment