Write a program

  • Write a program that prints a poem of your choice. If you don’t have a favorite poem, search the Internet for “Emily Dickinson” or “e e cummings”
  • E1.15 Type in and run the following program. Then modify it to show the message “Hello, your name!”.
    import javax.swing.JOptionPane;public class DialogViewer
    {
    public static void main(String[] args)
    {
    JOptionPane.showMessageDialog(null, “Hello, World!”);
    }
    }
  • E1.16 Type in and run the following program. Then modify it to print “Hello, name!”, displaying the name that the user typed in.
    import javax.swing.JOptionPane;public class DialogViewer
    {
    public static void main(String[] args)
    {
    String name = JOptionPane.showInputDialog(“What is your name?”);
    System.out.println(name);
    }
    }
    E1.17 (OPTIONAL) Modify the program from Exercise E1.16 so that the dialog continues with the message “My name is Hal! What would you like me to do?” Discard the user’s input and display a message such as
    I’m sorry, Dave. I’m afraid I can’t do that.
    Replace Dave with the name that was provided by the user.

Place Order
Grab A 14% Discount on This Paper
Pages (550 words)
Approximate price: -
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Try it now!

Grab A 14% Discount on This Paper

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.