-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyMadLib.java
More file actions
67 lines (47 loc) · 1.45 KB
/
MyMadLib.java
File metadata and controls
67 lines (47 loc) · 1.45 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
public class MyMadLib {
public static void main(String[] args) {
/* Text in orange in JGrasp like this are called comments.
* A comment is text that is written by someone like you
* that describes what the code is doing.
*
* For now, the comments are used to guide you on what to do.
* We will talk about comments in general in a future class.
*/
/* 1. Write code that will output to the user "Hello world!"
* 2. Replace the code outputting "Hello world!" with "Hello <your name>!"
*/
System.out.println("Hello world!");
/*
* 3. Ask the user to pick a verb
*/
System.out.print("...");
/*
* IGNORE THE CODE BELOW
*/
MadLib.processVerb();
/*
* 4. Ask the user to pick a noun
*/
System.out.print("...");
/*
* IGNORE THE CODE BELOW
*/
MadLib.processNoun();
/*
* 5. Ask the user to pick an adjective
*/
System.out.print("...");
/*
* IGNORE THE CODE BELOW
*/
MadLib.processAdjective();
/*
* 6. Tell the user that you're going to output the MadLib
*/
System.out.print("...");
/*
* IGNORE THE CODE BELOW
*/
MadLib.output();
}
}