Dog - int dM = Integer.parseInt(dogMonth int dD =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import javax.swing.JOptionPane; public class Dog { public static void main(String[]args) { String dogName; dogName = JOptionPane.showInputDialog(null,"Enter Your Dog's Name"); String dogMonth; dogMonth = JOptionPane.showInputDialog(null,"Enter Your Dog's Birth Month"); String dogDay; dogDay = JOptionPane.showInputDialog(null,"Enter Your Dog's Birth Day"); String dogYear; dogYear = JOptionPane.showInputDialog(null,"Enter Your Dog's Birth Year");
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int dM = Integer.parseInt(dogMonth); int dD = Integer.parseInt(dogDay); int dY = Integer.parseInt(dogYear); JOptionPane.showMessageDialog(null,"Your Name and Dog's Birthday is " + dogName + " 0" + dM + "/" + dD + "/" + dY); int Age = 2008 - dY; JOptionPane.showMessageDialog(null,"Your Dog's Age in dog years is " + Age*7); System.exit(0); }}...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online