Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Write a description of class Person here.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- import java.util.Scanner;
- public class Person
- {
- public static void main(String [] args) {
- System.out.println("Hello, and welcome to the human tester program, from Freelance Industries.");
- System.out.println("Question 1:");
- boolean areTheyHuman = isHuman();
- if(areTheyHuman = true) {
- System.out.println("Congratulations! According to our advanced testing protocol, you qualify as a non-sentient organsim.");
- }
- else {
- System.out.println("It's 2017; you can't person without memes.");
- }
- }
- public static boolean isHuman() {
- System.out.println("Do you meme? y for yes, n for no.");
- Scanner scan = new Scanner(System.in);
- char inputted = scan.next().charAt(0);
- boolean isHuman = false;
- if(inputted == 'y') {
- isHuman = true;
- }
- else {
- isHuman = false;
- }
- return(isHuman);
- }
- }
Add Comment
Please, Sign In to add comment