-
-
Save codecademydev/e23bed416bf68ac458604da860e4eabc to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MadLibs { | |
/* | |
This program is a mad libbed story | |
author GGBG | |
date: 01/14/20*/ | |
public static void main(String[] args){ | |
String name1 = "Jack"; | |
String adjective1="hungry"; | |
String adjective2 ="beautiful"; | |
String adjective3 = "noisy"; | |
String verb1="fly"; | |
String noun1 ="storks"; | |
String noun2 ="taxis"; | |
String noun3 ="flying sucers"; | |
String noun4 ="aliens"; | |
String noun5 ="pizzas"; | |
String noun6 ="tacos"; | |
String name2="Bobby"; | |
int number = 10; | |
String place1 = "Central Park"; | |
//The template for the story | |
String story = "This morning " +name1+" woke up feeling "+ adjective1 +". 'It is going to be a "+adjective2+" day!' Outside, a bunch of "+noun1+"s were protesting to keep "+noun2+" in stores. They began to "+verb1+" to the rhythm of the "+noun3+", which made all the "+noun4+"s very "+adjective3+". Concerned, "+name1+" texted "+name2+", who flew "+name1+" to "+place1+" and dropped "+name1+" in a puddle of frozen "+noun5+". "+name1+" woke up in the year "+number+", in a world where "+noun6+"s ruled the world."; | |
} | |
System.out.println(story); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment