/*
*Function of this build is to ask a student questions about
*school and have the answers turned into a sentence after answered.
*
*I'm getting a line that has all answers combined after the complete
*sentence is finished.
*
*/
package madlibs;
import java.util.Scanner;
public class MadLibs {
public static String major, course, instructor, restaurant, hangout,
addStatements;
public static Scanner keyboard = new Scanner(System.in);
public static void main(String[] args)
{
String combineStatements = addStatements();
System.out.println(combineStatements);
}
public static String addStatements()
{
System.out.println("What's your major?");
major = keyboard.next();
System.out.println("What's your favorite course?");
course = keyboard.next();
System.out.println("Whos your favorite instructor?");
instructor = keyboard.next();
System.out.println("What's your favorite restaurant on campus?");
restaurant = keyboard.next();
System.out.println("What's your favorite hangout place?");
hangout = keyboard.next();
addStatements = major + course + instructor + restaurant + hangout;
System.out.println("My major is " + major + " and I am taking a "
+ "class called " + course + " with the instructor called"
+ " Prof. " + instructor +
". After class, I like eating at " + restaurant + " and then"
+ " hanging out in the " + hangout);
return addStatements;
}
}