# 03 Print And Popups

# Greeter

View Source View Source


# Goal:

Print a global greeting to the console. Then use input and message dialogs to join Strings and send the user a friendly greeting!

# Steps:

  1. Create a new class called Greeter.
  2. Add a main method. Eclipse has a helpful schortcut - main
  3. Print "Hello World!" to the console. Eclipse has a helpful schortcut - syso
  4. Now ask the user for their name. The code looks like this:

String input = JOptionPane.showInputDialog("What is your name?");
  1. Join their name to the end of this greeting. The code looks like this.

JOptionPane.showMessageDialog(null,"Hello "+input);

# Madlibs

View Source View Source


madlibs image

# Goal:

Have you ever played Madlibs? You will get to use input and message dialogs to join Strings and build your own Madlib story.

# Steps:

  1. Find the Madlibs ecipe program ( MadlibsOfTheAmazon.java ) and open it using Eclipse.
  2. Follow the instructions in the program to help you make a hilarious story about crossing a piranha-infested river.
  3. You can invent your own madlib story too!

# World Domination

View Source View Source


world domination image

# Goal:

Use an if / else statement and pop-ups to find out if a person might get to rule the world!

# Steps:

  1. Find the World Domination recipe program ( WorldDomination.java ) and open it using Eclipse.
  2. Follow the instructions in the program to find out if a person might get to rule the world!.

# Quiz Game

View Source View Source


quiz image

# Goal:

Use pop-ups to ask the user "quiz" questions. Use if / else to check their answers.

# Steps:

  1. Find the Quiz Game recipe program ( QuizGame.java ) and open it using Eclipse.
  2. Follow the instructions in the program to code this game.

# Awesome or Not

View Source View Source


awesome image

# Goal:

Use random numbers and pop-ups to respond to a user's input

# Steps:

  1. Find the Awesome or Not recipe program ( AwesomeOrNot.java ) and open it using Eclipse.
  2. Follow the instructions in the program to code this game.