forked from League-Archive/IntroToJavaWorkshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsnooper.java
More file actions
21 lines (20 loc) · 1.17 KB
/
snooper.java
File metadata and controls
21 lines (20 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import javax.swing.JOptionPane;
public class snooper {
public static void main(String[] args) {
String name = JOptionPane.showInputDialog(null,"Hi, what is your name?");
JOptionPane.showMessageDialog(null,"Hi, "+ name);
String time=JOptionPane.showInputDialog(null,"What time is it?");
String robtime=JOptionPane.showInputDialog(null,"When is a good time to rob your house?");
String age = JOptionPane.showInputDialog(null,"What is your age?");
//JOptionPane.showMessageDialog(null,"Hi, you are "+ age+" years old");
String house = JOptionPane.showInputDialog(null,"Where do you live?");
//JOptionPane.showMessageDialog(null,"You live at "+ house);
String creditcard = JOptionPane.showInputDialog(null,"What is your creditcard number and the carier of it?");
//JOptionPane.showMessageDialog(null,"Your creditcard is "+ creditcard);
JOptionPane.showMessageDialog(null,"Sorry you are not very smart");
JOptionPane.showMessageDialog(null,"You are "+name+". "+age+" years old. You live at "+house+" and your creditcard number is "+creditcard);
JOptionPane.showMessageDialog(null,"I will rob you at "+robtime);
JOptionPane.showMessageDialog(null,"Watch out!");
System.out.println("SCARRRRRY");
}
}