-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMadLibs.java
More file actions
38 lines (25 loc) · 1.24 KB
/
MadLibs.java
File metadata and controls
38 lines (25 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
public class MadLibs {
/*
This program generates a mad libbed story.
Author: Saki
Date: 10/05/2023
*/
public static void main(String[] args){
String name1 = "Olivia";
String name2 = "Koko";
String adjective1 = "powerful";
String adjective2 = "scared";
String adjective3 = "friendly";
String verb1 = "cook";
String noun1 = "sisters"; //plural
String noun2 = "king";
String noun3 = "tyrant";
String noun4 = "bread";
String noun5 = "man";
String noun6 = "chief";
int number = 539;
String place1 = "Rome";
String story = "This morning " + name1 + " woke up feeling " + adjective1 + ". It is going to be a " + adjective2 + " day! " + "Outside, a bunch of " + noun1 + " were protesting to keep " + noun2 + " in stores. " + "They began to " + verb1 + " to the rhythm of the " + noun3 + ", which made all the " + noun4 + " 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 + " ruled the world.";
System.out.println(story);
}
}